]> git.decadent.org.uk Git - ion3.git/blobdiff - ioncore/clientwin.c
[svn-upgrade] Integrating new upstream version, ion3 (20071220)
[ion3.git] / ioncore / clientwin.c
index 7c3880ece4862934b58222e4036a60c6c0fc27ca..1b85dfcf994c8e95ee0522452139869fa204d990 100644 (file)
@@ -1319,6 +1319,25 @@ static ExtlTab clientwin_get_configuration(WClientWin *cwin)
 }
 
 
+static void do_sm(ExtlTab tab)
+{
+    SMAddCallback *add_cb;
+    SMCfgCallback *cfg_cb;
+    WPHolder *ph;
+    
+    ioncore_get_sm_callbacks(&add_cb, &cfg_cb);
+    
+    if(add_cb!=NULL){
+        ph=ioncore_get_load_pholder();
+    
+        if(ph!=NULL){
+            if(!add_cb(ph, tab))
+                destroy_obj((Obj*)ph);
+        }
+    }
+}
+
+    
 WRegion *clientwin_load(WWindow *par, const WFitParams *fp, ExtlTab tab)
 {
     double wind=0;
@@ -1345,7 +1364,7 @@ WRegion *clientwin_load(WWindow *par, const WFitParams *fp, ExtlTab tab)
                                           &real_chkc);
     
     if(!got_chkc || real_chkc!=chkc){
-        ioncore_clientwin_load_missing();
+        do_sm(tab);
         return NULL;
     }
 
@@ -1356,6 +1375,9 @@ WRegion *clientwin_load(WWindow *par, const WFitParams *fp, ExtlTab tab)
         return NULL;
     }
     
+    if(attr.root!=region_root_of((WRegion*)par))
+        return NULL;
+        
     if(attr.override_redirect || 
        (ioncore_g.opmode==IONCORE_OPMODE_INIT && attr.map_state!=IsViewable)){
         warn(TR("Saved client window does not want to be managed."));