static void splitfloat_reparent(WSplitFloat *split, WWindow *target) { if(split->ssplit.current!=SPLIT_CURRENT_TL){ reparentreg((WRegion*)split->tlpwin, target); split_reparent(split->ssplit.tl, target); reparentreg((WRegion*)split->brpwin, target); split_reparent(split->ssplit.br, target); }else{ reparentreg((WRegion*)split->brpwin, target); split_reparent(split->ssplit.br, target); reparentreg((WRegion*)split->tlpwin, target); split_reparent(split->ssplit.tl, target); } }
bool tiling_fitrep(WTiling *ws, WWindow *par, const WFitParams *fp) { WTilingIterTmp tmp; bool ok=FALSE; if(par!=NULL){ if(!region_same_rootwin((WRegion*)ws, (WRegion*)par)) return FALSE; region_unset_parent((WRegion*)ws); XReparentWindow(ioncore_g.dpy, ws->dummywin, par->win, fp->g.x, fp->g.y); region_set_parent((WRegion*)ws, par); if(ws->split_tree!=NULL) split_reparent(ws->split_tree, par); } REGION_GEOM(ws)=fp->g; if(ws->split_tree!=NULL){ bool done=FALSE; if(fp->mode®ION_FIT_ROTATE) ok=split_rotate_to(ws->split_tree, &(fp->g), fp->rotation); if(!ok) split_resize(ws->split_tree, &(fp->g), PRIMN_ANY, PRIMN_ANY); } return TRUE; }