X-Git-Url: https://git.decadent.org.uk/gitweb/?p=ion3.git;a=blobdiff_plain;f=ioncore%2Ffullscreen.c;fp=ioncore%2Ffullscreen.c;h=a49d4f5eee31372dfdb2d27d2bc329ada5b297bc;hp=56ea52702e54c75f58aa083d0da7f2f755f787db;hb=de22e45179cb3bafa490294d31d47f361047a30a;hpb=803afbc1cd633f6c025bcd9537e9b7e9aedadd0d diff --git a/ioncore/fullscreen.c b/ioncore/fullscreen.c index 56ea527..a49d4f5 100644 --- a/ioncore/fullscreen.c +++ b/ioncore/fullscreen.c @@ -20,7 +20,7 @@ #include "fullscreen.h" #include "mwmhints.h" #include "focus.h" -#include "group-cw.h" +#include "group.h" #include "return.h" @@ -125,8 +125,7 @@ bool clientwin_fullscreen_may_switchto(WClientWin *cwin) } -bool clientwin_check_fullscreen_request(WClientWin *cwin, int w, int h, - bool sw) +WScreen *clientwin_fullscreen_chkrq(WClientWin *cwin, int w, int h) { WScreen *scr; WMwmHints *mwm; @@ -135,7 +134,7 @@ bool clientwin_check_fullscreen_request(WClientWin *cwin, int w, int h, mwm=xwindow_get_mwmhints(cwin->win); if(mwm==NULL || !(mwm->flags&MWM_HINTS_DECORATIONS) || mwm->decorations!=0) - return FALSE; + return NULL; FOR_ALL_SCREENS(scr){ if(!region_same_rootwin((WRegion*)scr, (WRegion*)cwin)) @@ -144,17 +143,11 @@ bool clientwin_check_fullscreen_request(WClientWin *cwin, int w, int h, * and doesn't set position, so we also don't check position here, * and instead take the first screen with matching size. */ - if(REGION_GEOM(scr).w==w && REGION_GEOM(scr).h==h){ - cwin->flags|=CLIENTWIN_FS_RQ; - if(!region_fullscreen_scr((WRegion*)cwin, (WScreen*)scr, sw)){ - cwin->flags&=~CLIENTWIN_FS_RQ; - return FALSE; - } - return TRUE; - } + if(REGION_GEOM(scr).w==w && REGION_GEOM(scr).h==h) + return scr; } - return FALSE; + return NULL; }