/*
* ion/ioncore/attach.c
*
- * Copyright (c) Tuomo Valkonen 1999-2006.
+ * Copyright (c) Tuomo Valkonen 1999-2007.
*
* Ion is free software; you can redistribute it and/or modify it under
* the terms of the GNU Lesser General Public License as published by
if(reg==NULL)
return NULL;
-
+
if(!cont(mgr, reg, cont_param)){
destroy_obj((Obj*)reg);
return NULL;
}
+WRegion *ioncore_newly_created=NULL;
+
+
static WRegion *doit_load(WRegion *mgr,
WWindow *par, const WFitParams *fp,
WRegionDoAttachFn *cont, void *cont_param,
ExtlTab tab)
{
- WRegion *reg;
+ WRegion *reg=NULL;
if(extl_table_gets_o(tab, "reg", (Obj**)®)){
if(!OBJ_IS(reg, WRegion))
return FALSE;
+ }/*else if(extl_table_is_bool_set(tab, "reg_use_new")){
+ reg=ioncore_newly_created;
+ if(reg==NULL)
+ return NULL;
+ }*/
+
+ if(reg!=NULL){
return doit_reparent(mgr, par, fp, cont, cont_param, reg);
+ }else{
+ return doit_new(mgr, par, fp, cont, cont_param,
+ (WRegionCreateFn*)wrap_load, &tab);
}
-
- return doit_new(mgr, par, fp, cont, cont_param,
- (WRegionCreateFn*)wrap_load, &tab);
}
WRegion *region_attach_helper(WRegion *mgr,