]> git.decadent.org.uk Git - ion3.git/blobdiff - ioncore/group-cw.c
Started renaming.
[ion3.git] / ioncore / group-cw.c
index dc5cc69e6b43aca6dadc2e8cbc9e05a73aae8e47..d0f15067454adb855f616556852ec08f0266374d 100644 (file)
@@ -1,12 +1,9 @@
 /*
  * ion/ioncore/group-cw.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
- * the Free Software Foundation; either version 2.1 of the License, or
- * (at your option) any later version.
+ * See the included file LICENSE for details.
  */
 
 #include <string.h>
 /*{{{ Add/remove managed */
 
 
-WRegion *create_transient_frame(WWindow *par, 
-                                const WFitParams *fp)
-{
-    return (WRegion*)create_frame(par, fp, FRAME_MODE_TRANSIENT);
-}
-
-
 static WPHolder *groupcw_transient_pholder(WGroupCW *cwg, 
                                            const WClientWin *cwin,
                                            const WManageParams *mp)
@@ -69,7 +59,7 @@ static WPHolder *groupcw_transient_pholder(WGroupCW *cwg,
         fp.inner_geom_gravity_set=1;
         fp.inner_geom=mp->geom;
         fp.gravity=ForgetGravity;
-        fp.mkframe=create_transient_frame;
+        fp.mode=FRAME_MODE_TRANSIENT;
         
         ph=(WPHolder*)create_grouppholder(&cwg->grp, NULL, &param);
         
@@ -79,9 +69,9 @@ static WPHolder *groupcw_transient_pholder(WGroupCW *cwg,
 
 
 WPHolder *groupcw_prepare_manage(WGroupCW *cwg, const WClientWin *cwin,
-                                 const WManageParams *param, int redir)
+                                 const WManageParams *param, int priority)
 {
-    if(redir==MANAGE_REDIR_STRICT_YES)
+    if(!MANAGE_PRIORITY_OK(priority, MANAGE_PRIORITY_GROUP))
         return NULL;
     
     /* Only catch windows with transient mode set to current here. */
@@ -181,13 +171,20 @@ const char *groupcw_displayname(WGroupCW *cwg)
 }
 
 
-void groupcw_managed_notify(WGroupCW *cwg, WRegion *reg, const char *how)
+void groupcw_managed_notify(WGroupCW *cwg, WRegion *reg, WRegionNotify how)
 {
-    if(group_bottom(&cwg->grp)==reg 
-       && strcmp(how, "name")==0){
+    if(group_bottom(&cwg->grp)==reg && how==ioncore_g.notifies.name){
         /* Title has changed */
         region_notify_change((WRegion*)cwg, how);
     }
+    
+    group_managed_notify(&cwg->grp, reg, how);
+}
+
+
+void groupcw_bottom_set(WGroupCW *cwg)
+{
+    region_notify_change((WRegion*)cwg, ioncore_g.notifies.name);
 }
 
 
@@ -200,13 +197,10 @@ void groupcw_managed_notify(WGroupCW *cwg, WRegion *reg, const char *how)
 bool groupcw_init(WGroupCW *cwg, WWindow *parent, const WFitParams *fp)
 {
     cwg->transient_szplcy=DFLT_SZPLCY;
-    /*cwg->fs_pholder=NULL;*/
     
     if(!group_init(&(cwg->grp), parent, fp))
         return FALSE;
     
-    cwg->grp.bottom_last_close=TRUE;
-
     region_add_bindmap((WRegion*)cwg, ioncore_groupcw_bindmap);
     
     return TRUE;
@@ -289,6 +283,9 @@ static DynFunTab groupcw_dynfuntab[]={
     
     {region_managed_notify,
      groupcw_managed_notify},
+     
+    {group_bottom_set,
+     groupcw_bottom_set},
     
     END_DYNFUNTAB
 };