summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDana Jansens <danakj@orodu.net>2003-10-13 01:10:03 +0000
committerDana Jansens <danakj@orodu.net>2003-10-13 01:10:03 +0000
commitb9b3123305a943223978f6bb91e1284b4eb95adc (patch)
tree87b225fbd7d04ca90cb292ed3bc72e2b218af8a7
parentd07be3da4452866d4691348efd84d92a781274c3 (diff)
when getting the state, grab the above/below from the max amongst other members of the client's group
-rw-r--r--openbox/client.c28
1 files changed, 28 insertions, 0 deletions
diff --git a/openbox/client.c b/openbox/client.c
index fab5328d..cc5d80ca 100644
--- a/openbox/client.c
+++ b/openbox/client.c
@@ -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)