void netwm_set_active(WRegion *reg) { CARD32 data[1]={None}; if(OBJ_IS(reg, WClientWin)) data[0]=region_xwindow(reg); /* The spec doesn't say how multihead should be handled, so * we just update the root window the window is on. */ XChangeProperty(ioncore_g.dpy, region_root_of(reg), atom_net_active_window, XA_WINDOW, 32, PropModeReplace, (uchar*)data, 1); }
static bool dock_do_attach_final(WDock *dock, WRegion *reg, void *UNUSED(unused)) { WDockApp *dockapp, *before_dockapp; WRectangle geom; bool draw_border=TRUE; int pos=INT_MAX; /* Create and initialise a new WDockApp struct */ dockapp=ALLOC(WDockApp); if(dockapp==NULL) return FALSE; if(OBJ_IS(reg, WClientWin)){ ExtlTab proptab=((WClientWin*)reg)->proptab; extl_table_gets_b(proptab, CLIENTWIN_WINPROP_BORDER, &draw_border); extl_table_gets_i(proptab, CLIENTWIN_WINPROP_POSITION, &pos); } dockapp->reg=reg; dockapp->draw_border=draw_border; dockapp->pos=pos; dockapp->tile=FALSE; /* Insert the dockapp at the correct relative position */ before_dockapp=dock->dockapps; for(before_dockapp=dock->dockapps; before_dockapp!=NULL && dockapp->pos>=before_dockapp->pos; before_dockapp=before_dockapp->next){ } if(before_dockapp!=NULL){ LINK_ITEM_BEFORE(dock->dockapps, before_dockapp, dockapp, next, prev); }else{ LINK_ITEM(dock->dockapps, dockapp, next, prev); } region_set_manager(reg, (WRegion*)dock); geom=REGION_GEOM(reg); dock_managed_rqgeom_(dock, reg, REGION_RQGEOM_WEAK_X|REGION_RQGEOM_WEAK_Y, &geom, NULL, FALSE); region_map(reg); return TRUE; }
/* It is ugly to do this here, but it will have to do for now... */ static void set_saved(WMoveresMode *mode, WRegion *reg) { WFrame *frame; if(!OBJ_IS(reg, WFrame)) return; frame=(WFrame*)reg; /* Restore saved sizes from the beginning of the resize action */ if(mode->origgeom.w!=mode->geom.w){ frame->saved_geom.x=mode->origgeom.x; frame->saved_geom.w=mode->origgeom.w; } if(mode->origgeom.h!=mode->geom.h){ frame->saved_geom.y=mode->origgeom.y; frame->saved_geom.h=mode->origgeom.h; } }
static bool regnodefilter(WSplit *split) { return OBJ_IS(split, WSplitRegion); }