X-Git-Url: https://git.decadent.org.uk/gitweb/?a=blobdiff_plain;f=ioncore%2Fclientwin.c;h=1b85dfcf994c8e95ee0522452139869fa204d990;hb=3a5221140c3d59e7e964f9766f490e688a41ef4c;hp=7c3880ece4862934b58222e4036a60c6c0fc27ca;hpb=720e6978185b09f2b2f60a6b96018238085a7238;p=ion3.git diff --git a/ioncore/clientwin.c b/ioncore/clientwin.c index 7c3880e..1b85dfc 100644 --- a/ioncore/clientwin.c +++ b/ioncore/clientwin.c @@ -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."));