]> Dogcows Code - chaz/openbox/blobdiff - openbox/stacking.c
2 in 1 deal :\
[chaz/openbox] / openbox / stacking.c
index eac4025cfb9b089b24cddc574fa28729a84add78..e205d4b05b952032ef0dc65f4a7a6c801164fc19 100644 (file)
@@ -120,13 +120,11 @@ void stacking_raise(ObWindow *window)
             } else {
                 GSList *it;
 
-                /* the check for TRAN_GROUP is to prevent an infinate loop with
-                   2 transients of the same group at the head of the group's
-                   members list */
                 for (it = client->group->members; it; it = it->next) {
                     Client *c = it->data;
 
-                    if (c != client && c->transient_for != TRAN_GROUP)
+                    /* checking transient_for prevents infinate loops! */
+                    if (c != client && !c->transient_for)
                         stacking_raise(it->data);
                 }
                 if (it == NULL) return;
@@ -183,13 +181,11 @@ void stacking_lower(ObWindow *window)
             } else {
                 GSList *it;
 
-                /* the check for TRAN_GROUP is to prevent an infinate loop with
-                   2 transients of the same group at the head of the group's
-                   members list */
                 for (it = client->group->members; it; it = it->next) {
                     Client *c = it->data;
 
-                    if (c != client && c->transient_for != TRAN_GROUP)
+                    /* checking transient_for prevents infinate loops! */
+                    if (c != client && !c->transient_for)
                         stacking_lower(it->data);
                 }
                 if (it == NULL) return;
@@ -228,15 +224,12 @@ void stacking_add_nonintrusive(ObWindow *win)
                 GSList *sit;
                 GList *it;
 
-                /* the check for TRAN_GROUP is to prevent an infinate loop with
-                   2 transients of the same group at the head of the group's
-                   members list */
                 for (it = stacking_list; !parent && it; it = it->next) {
                     for (sit = client->group->members; !parent && sit;
                          sit = sit->next) {
                         Client *c = sit->data;
-                        if (sit->data == it->data &&
-                            c->transient_for != TRAN_GROUP)
+                        /* checking transient_for prevents infinate loops! */
+                        if (sit->data == it->data && !c->transient_for)
                             parent = it->data;
                     }
                 }
This page took 0.021635 seconds and 4 git commands to generate.