X-Git-Url: https://git.decadent.org.uk/gitweb/?p=ion3.git;a=blobdiff_plain;f=ioncore%2Fmanage.c;fp=ioncore%2Fmanage.c;h=9215804123b63c79444ee0fe394016b4b9b8db4f;hp=5b036053c52218218b5f9dd50deb2f81133b0e5d;hb=e3aec18706513a87eaa7839dfdaf7e0fcd0d8d2a;hpb=29aae1975d46f66b97a2b873f1875eded8c6fbc3 diff --git a/ioncore/manage.c b/ioncore/manage.c index 5b03605..9215804 100644 --- a/ioncore/manage.c +++ b/ioncore/manage.c @@ -1,7 +1,7 @@ /* * ion/ioncore/manage.c * - * Copyright (c) Tuomo Valkonen 1999-2008. + * Copyright (c) Tuomo Valkonen 1999-2009. * * See the included file LICENSE for details. */ @@ -186,6 +186,7 @@ bool clientwin_do_manage_default(WClientWin *cwin, WPHolder *ph=NULL; int swf=(param->switchto ? PHOLDER_ATTACH_SWITCHTO : 0); bool ok, uq=FALSE; + WRegion *createroot=NULL; /* Find a suitable screen */ scr=clientwin_find_suitable_screen(cwin, param); @@ -226,15 +227,22 @@ bool clientwin_do_manage_default(WClientWin *cwin, return FALSE; /* Not in full-screen mode; use the placeholder to attach. */ - - ok=pholder_attach(ph, swf, (WRegion*)cwin); - + { + WRegionAttachData data; + data.type=REGION_ATTACH_REPARENT; + data.u.reg=(WRegion*)cwin; + + createroot=pholder_do_attach(ph, + swf|PHOLDER_ATTACH_RETURN_CREATEROOT, + &data); + } + destroy_obj((Obj*)ph); - if(uq && ok) - ioncore_unsqueeze((WRegion*)cwin, FALSE); + if(uq && createroot!=NULL) + ioncore_unsqueeze(createroot, FALSE); - return ok; + return (createroot!=NULL); }