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) {
return;
} else {
GSList *it;
+ gboolean raised = FALSE;
- /* 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);
+ raised = TRUE;
+ }
}
- if (it == NULL) return;
+ if (raised) return;
}
}
}
} 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;
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;
}
}