]> Dogcows Code - chaz/openbox/commitdiff
when getting the state, grab the above/below from the max amongst other members of...
authorDana Jansens <danakj@orodu.net>
Mon, 13 Oct 2003 01:10:03 +0000 (01:10 +0000)
committerDana Jansens <danakj@orodu.net>
Mon, 13 Oct 2003 01:10:03 +0000 (01:10 +0000)
openbox/client.c

index fab5328d2b712a40fd85354974d5f40db920c5e8..cc5d80cad5c2fea39cd6a556b0ca443f6daf1c0c 100644 (file)
@@ -849,6 +849,34 @@ static void client_get_state(ObClient *self)
 
         g_free(state);
     }
+
+    if (!(self->above || self->below)) {
+        if (client_has_group_siblings(self)) {
+            /* apply stuff from the group */
+            GSList *it;
+            gint layer = -1;
+
+            for (it = self->group->members; it; it = g_slist_next(it)) {
+                ObClient *c = it->data;
+                if (c != self && !client_search_transient(self, c))
+                    layer = MAX(layer,
+                                (c->above ? 1 : (c->below ? -1 : 0)));
+            }
+            switch (layer) {
+            case -1:
+                self->below = TRUE;
+                break;
+            case 0:
+                break;
+            case 1:
+                self->above = TRUE;
+                break;
+            default:
+                g_assert_not_reached();
+                break;
+            }
+        }
+    }
 }
 
 static void client_get_shaped(ObClient *self)
This page took 0.028536 seconds and 4 git commands to generate.