X-Git-Url: https://git.decadent.org.uk/gitweb/?p=ion3.git;a=blobdiff_plain;f=ioncore%2Fdetach.c;h=e175759e7d231d0d1681da036f5280b7746ac594;hp=21997ec1f3feb3eb6e968c9ee2b66f0020745b61;hb=e3aec18706513a87eaa7839dfdaf7e0fcd0d8d2a;hpb=720e6978185b09f2b2f60a6b96018238085a7238 diff --git a/ioncore/detach.c b/ioncore/detach.c index 21997ec..e175759 100644 --- a/ioncore/detach.c +++ b/ioncore/detach.c @@ -1,7 +1,7 @@ /* * ion/ioncore/detach.c * - * Copyright (c) Tuomo Valkonen 1999-2007. + * Copyright (c) Tuomo Valkonen 1999-2009. * * See the included file LICENSE for details. */ @@ -63,6 +63,7 @@ static bool ioncore_do_detach(WRegion *reg, WGroup *grp, WFrameMode framemode, } if(framemode!=FRAME_MODE_UNKNOWN){ + /* TODO: remove/obsolete this special case */ WFramedParam fpa=FRAMEDPARAM_INIT; fpa.mode=framemode; @@ -83,12 +84,18 @@ static bool ioncore_do_detach(WRegion *reg, WGroup *grp, WFrameMode framemode, }else{ WStacking *st=ioncore_find_stacking(reg); + ap.level_set=TRUE; + ap.level=framelevel+1; + if(st!=NULL){ ap.szplcy=st->szplcy; ap.szplcy_set=TRUE; - ap.level_set=TRUE; - ap.level=maxof(st->level, STACKING_LEVEL_NORMAL); + /* Hack for modal detached queries, while transients become + * non-modal detached. + */ + if(st->level>STACKING_LEVEL_MODAL1) + ap.level=st->level; } ap.geom_set=TRUE; @@ -215,7 +222,6 @@ bool ioncore_detach_extl(WRegion *reg, const char *how) void do_unsqueeze(WRegion *reg) { WSizeHints h; - WRegion *mgr=REGION_MANAGER(reg); if(OBJ_IS(reg, WScreen)) return; @@ -231,11 +237,6 @@ void do_unsqueeze(WRegion *reg) } ioncore_detach(reg, SETPARAM_SET); - - if(REGION_MANAGER(reg)==mgr) - return; - - do_unsqueeze(reg); } @@ -249,7 +250,7 @@ EXTL_EXPORT void ioncore_unsqueeze(WRegion *reg, bool override) { if(ioncore_g.unsqueeze_enabled || override) - do_unsqueeze(region_groupleader_of(reg)); + do_unsqueeze(reg); }