X-Git-Url: https://git.dogcows.com/gitweb?a=blobdiff_plain;f=openbox%2Fstacking.c;h=d611246977f40fd837fcb30d4292a64c6b11182b;hb=cd54e31a5922b329de20ca6cb355a4212a7aa704;hp=e205d4b05b952032ef0dc65f4a7a6c801164fc19;hpb=993fc6226d06f25513756251283e70054082ee8a;p=chaz%2Fopenbox diff --git a/openbox/stacking.c b/openbox/stacking.c index e205d4b0..d6112469 100644 --- a/openbox/stacking.c +++ b/openbox/stacking.c @@ -112,6 +112,7 @@ void stacking_raise(ObWindow *window) if (WINDOW_IS_CLIENT(window)) { Client *client = WINDOW_AS_CLIENT(window); + /* move up the transient chain as far as possible first */ if (client->transient_for) { if (client->transient_for != TRAN_GROUP) { @@ -119,15 +120,18 @@ void stacking_raise(ObWindow *window) return; } else { GSList *it; + gboolean raised = FALSE; for (it = client->group->members; it; it = it->next) { Client *c = it->data; /* checking transient_for prevents infinate loops! */ - if (c != client && !c->transient_for) + if (c != client && !c->transient_for) { stacking_raise(it->data); + raised = TRUE; + } } - if (it == NULL) return; + if (raised) return; } } }