/*
* ion/ioncore/manage.c
*
- * Copyright (c) Tuomo Valkonen 1999-2008.
+ * Copyright (c) Tuomo Valkonen 1999-2009.
*
* See the included file LICENSE for details.
*/
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);
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);
}