X-Git-Url: https://git.decadent.org.uk/gitweb/?a=blobdiff_plain;f=mod_tiling%2Ftiling.c;h=e933dc70494e088c8ab99910e3dcb9d6e0790e17;hb=b355f9832d094cdb9e700e01cbc063e3fdb4f58b;hp=6fec3723b095675a06c429a934a2ce056375f7a6;hpb=d2a43a53786878c1273313249d3b49f6cd559b00;p=ion3.git diff --git a/mod_tiling/tiling.c b/mod_tiling/tiling.c index 6fec372..e933dc7 100644 --- a/mod_tiling/tiling.c +++ b/mod_tiling/tiling.c @@ -432,6 +432,8 @@ void tiling_manage_stdisp(WTiling *ws, WRegion *stdisp, tiling_unmanage_stdisp(ws, TRUE, TRUE); return; } + + stdisp->flags|=REGION_SKIP_FOCUS; dg=((WSplit*)(ws->stdispnode))->geom; @@ -660,6 +662,7 @@ void tiling_do_managed_remove(WTiling *ws, WRegion *reg) } region_unset_manager(reg, (WRegion*)ws); + splittree_set_node_of(reg, NULL); } @@ -701,6 +704,7 @@ void tiling_managed_remove(WTiling *ws, WRegion *reg) if(other!=NULL){ node->reg=other; + splittree_set_node_of(other, node); tiling_managed_add(ws, other); reused=TRUE; }else{ @@ -989,10 +993,6 @@ static WFrame *tiling_do_split(WTiling *ws, WSplit *node, destroy_obj((Obj*)newframe); return NULL; } - - /* Restack */ - if(ws->split_tree!=NULL) - split_restack(ws->split_tree, ws->dummywin, Above); return newframe; } @@ -1067,45 +1067,26 @@ WFrame *tiling_split_at(WTiling *ws, WFrame *frame, const char *dirstr, } -void do_unsplit(WRegion *reg) +/*EXTL_DOC + * Try to relocate regions managed by \var{reg} to another frame + * and, if possible, destroy it. + */ +EXTL_EXPORT_MEMBER +void tiling_unsplit_at(WTiling *ws, WRegion *reg) { - WTiling *ws=REGION_MANAGER_CHK(reg, WTiling); WPHolder *ph; - bool res; - if(ws==NULL) + if(reg==NULL || REGION_MANAGER(reg)!=(WRegion*)ws) return; ph=region_get_rescue_pholder_for((WRegion*)ws, reg); - if(ph==NULL){ - res=!region_rescue_needed(reg); - }else{ - res=region_rescue(reg, ph); + if(ph!=NULL){ + region_rescue(reg, ph, REGION_RESCUE_NODEEP|REGION_RESCUE_PHFLAGS_OK); destroy_obj((Obj*)ph); } - if(!res){ - warn(TR("Unable to unsplit: Could not move client windows " - "elsewhere within the tiling.")); - return; - } - - destroy_obj((Obj*)reg); -} - - -/*EXTL_DOC - * Try to relocate regions managed by \var{reg} to another frame - * and, if possible, destroy it. - */ -EXTL_EXPORT_MEMBER -void tiling_unsplit_at(WTiling *ws, WRegion *reg) -{ - if(reg==NULL || REGION_MANAGER(reg)!=(WRegion*)ws) - return; - - mainloop_defer_action((Obj*)reg, (WDeferredAction*)do_unsplit); + region_defer_rqdispose(reg); }