X-Git-Url: https://git.decadent.org.uk/gitweb/?a=blobdiff_plain;f=ioncore%2Fnetwm.c;h=07e1deef2390ac9674d68fbe32a8854e4d94ae68;hb=ae4260bb64817c11f9a7140324cd3e3ba113e297;hp=d7c466e69cfd6c7c361d8d849456095c20b46a01;hpb=803afbc1cd633f6c025bcd9537e9b7e9aedadd0d;p=ion3.git diff --git a/ioncore/netwm.c b/ioncore/netwm.c index d7c466e..07e1dee 100644 --- a/ioncore/netwm.c +++ b/ioncore/netwm.c @@ -3,10 +3,7 @@ * * Copyright (c) Tuomo Valkonen 1999-2007. * - * 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 @@ -22,6 +19,7 @@ #include "focus.h" #include "xwindow.h" #include "extlconv.h" +#include "group.h" /*{{{ Atoms */ @@ -73,8 +71,8 @@ void netwm_init_rootwin(WRootWin *rw) XChangeProperty(ioncore_g.dpy, WROOTWIN_ROOT(rw), atom_net_supported, XA_ATOM, 32, PropModeReplace, (uchar*)atoms, N_NETWM); - /* Something else should probably be used as WM name here. */ - p[0]=prog_execname(); + + p[0]=libtu_progbasename(); xwindow_set_text_property(rw->dummy_win, atom_net_wm_name, p, 1); } @@ -85,7 +83,7 @@ void netwm_init_rootwin(WRootWin *rw) /*{{{ _NET_WM_STATE */ -int netwm_check_initial_fullscreen(WClientWin *cwin, bool sw) +WScreen *netwm_check_initial_fullscreen(WClientWin *cwin) { int i, n; @@ -96,18 +94,16 @@ int netwm_check_initial_fullscreen(WClientWin *cwin, bool sw) 1, TRUE, (uchar**)&data); if(n<0) - return -1; + return NULL; for(i=0; idata.l[0]==_NET_WM_STATE_ADD || ev->data.l[0]==_NET_WM_STATE_TOGGLE){ + WRegion *grp=region_groupleader_of((WRegion*)cwin); bool sw=clientwin_fullscreen_may_switchto(cwin); cwin->flags|=CLIENTWIN_FS_RQ; - if(!region_enter_fullscreen((WRegion*)cwin, sw)) + if(!region_enter_fullscreen(grp, sw)) cwin->flags&=~CLIENTWIN_FS_RQ; }else{ /* Should not be set.. */ @@ -156,9 +153,10 @@ static void netwm_state_change_rq(WClientWin *cwin, }else{ if(ev->data.l[0]==_NET_WM_STATE_REMOVE || ev->data.l[0]==_NET_WM_STATE_TOGGLE){ + WRegion *grp=region_groupleader_of((WRegion*)cwin); bool sw=clientwin_fullscreen_may_switchto(cwin); cwin->flags&=~CLIENTWIN_FS_RQ; - region_leave_fullscreen((WRegion*)cwin, sw); + region_leave_fullscreen(grp, sw); }else{ /* Set the flag */ cwin->flags|=CLIENTWIN_FS_RQ;