]> git.decadent.org.uk Git - ion3.git/blobdiff - ioncore/group-cw.c
Changed /etc/X11/$(PACKAGE) to /etc/X11/ion3 since the path should be the same in...
[ion3.git] / ioncore / group-cw.c
index 8181af80bd96bc60f5294dd69277445da479417b..5a2a32d3ceda3377fe3a19f95a057363f612335a 100644 (file)
@@ -3,10 +3,7 @@
  *
  * 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>
@@ -72,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. */
@@ -119,6 +116,23 @@ WPHolder *groupcw_prepare_manage_transient(WGroupCW *cwg,
 }
 
 
+static WRegion *groupcw_managed_disposeroot(WGroupCW *ws, WRegion *reg)
+{
+    WGroupIterTmp tmp;
+    WStacking *st;
+    WRegion *tmpr;
+    
+    FOR_ALL_NODES_IN_GROUP(&ws->grp, st, tmp){
+        if(st!=ws->grp.managed_stdisp && st->reg!=reg){
+            return reg;
+        }
+    }
+    
+    tmpr=region_disposeroot((WRegion*)ws);
+    return (tmpr!=NULL ? tmpr : reg);
+}
+
+
 /*}}}*/
 
 
@@ -185,6 +199,12 @@ void groupcw_managed_notify(WGroupCW *cwg, WRegion *reg, WRegionNotify how)
 }
 
 
+void groupcw_bottom_set(WGroupCW *cwg)
+{
+    region_notify_change((WRegion*)cwg, ioncore_g.notifies.name);
+}
+
+
 /*}}}*/
 
 
@@ -274,12 +294,18 @@ static DynFunTab groupcw_dynfuntab[]={
 
     {(DynFun*)region_prepare_manage_transient,
      (DynFun*)groupcw_prepare_manage_transient},
+     
+    {(DynFun*)region_managed_disposeroot,
+     (DynFun*)groupcw_managed_disposeroot},
     
     {(DynFun*)region_displayname,
      (DynFun*)groupcw_displayname},
     
     {region_managed_notify,
      groupcw_managed_notify},
+     
+    {group_bottom_set,
+     groupcw_bottom_set},
     
     END_DYNFUNTAB
 };