#include "focus.h"
#include "xwindow.h"
#include "extlconv.h"
+#include "group.h"
/*{{{ Atoms */
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);
}
/*{{{ _NET_WM_STATE */
-int netwm_check_initial_fullscreen(WClientWin *cwin, bool sw)
+WScreen *netwm_check_initial_fullscreen(WClientWin *cwin)
{
int i, n;
1, TRUE, (uchar**)&data);
if(n<0)
- return -1;
+ return NULL;
for(i=0; i<n; i++){
- if(data[i]==(long)atom_net_wm_state_fullscreen){
- ret=region_enter_fullscreen((WRegion*)cwin, sw);
- break;
- }
+ if(data[i]==(long)atom_net_wm_state_fullscreen)
+ return region_screen_of((WRegion*)cwin);
}
XFree((void*)data);
- return ret;
+ return NULL;
}
if(!REGION_IS_FULLSCREEN(cwin)){
if(ev->data.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.. */
}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;