X-Git-Url: https://git.decadent.org.uk/gitweb/?a=blobdiff_plain;f=ioncore%2Ffullscreen.c;h=2ddf9856bacb066802a171640c276417fd2a42c0;hb=0e823ba752af388ba5ca99800d094f88a11290db;hp=56ea52702e54c75f58aa083d0da7f2f755f787db;hpb=471a5e5f9928e2d324b2e10422a420f458bd63ff;p=ion3.git diff --git a/ioncore/fullscreen.c b/ioncore/fullscreen.c index 56ea527..2ddf985 100644 --- a/ioncore/fullscreen.c +++ b/ioncore/fullscreen.c @@ -1,12 +1,9 @@ /* * ion/ioncore/fullscreen.c * - * Copyright (c) Tuomo Valkonen 1999-2007. + * Copyright (c) Tuomo Valkonen 1999-2008. * - * Ion is free software; you can redistribute it and/or modify it under - * the terms of the GNU Lesser General Public License as published by - * the Free Software Foundation; either version 2.1 of the License, or - * (at your option) any later version. + * See the included file LICENSE for details. */ #include @@ -20,7 +17,7 @@ #include "fullscreen.h" #include "mwmhints.h" #include "focus.h" -#include "group-cw.h" +#include "group.h" #include "return.h" @@ -125,8 +122,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 +131,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 +140,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; } @@ -166,8 +156,9 @@ bool clientwin_check_fullscreen_request(WClientWin *cwin, int w, int h, /*EXTL_DOC * Set client window \var{reg} full screen state according to the - * parameter \var{how} (set/unset/toggle). Resulting state is returned, - * which may not be what was requested. + * parameter \var{how} (one of \codestr{set}, \codestr{unset}, or + * \codestr{toggle}). Resulting state is returned, which may not be + * what was requested. */ EXTL_EXPORT_AS(WGroup, set_fullscreen) bool group_set_fullscreen_extl(WGroup *grp, const char *how) @@ -176,16 +167,5 @@ bool group_set_fullscreen_extl(WGroup *grp, const char *how) } -/*EXTL_DOC - * Is \var{reg} in full screen mode? - */ -EXTL_SAFE -EXTL_EXPORT_MEMBER -bool group_is_fullscreen(WGroup *grp) -{ - return REGION_IS_FULLSCREEN(grp); -} - - /*}}}*/