/* if it is modal for a single window, then put that window at the top
of the focus order first, so it will be right after ours. the same is
- done with stacking */
- if (client->modal && (p = client_direct_parent(client)) &&
- p->layer == client->layer)
+ done with stacking
+ (transients are always in the same layer)
+ */
+ if (client->modal && (p = client_direct_parent(client)))
push_to_top(p);
focus_order = g_list_remove(focus_order, client);
ObClient *p;
/* if a window is modal for another single window, then raise it to the
- top too, the same is done with the focus order */
- while (selected->modal && (p = client_direct_parent(selected)) &&
- p->layer == selected->layer)
+ top too, the same is done with the focus order
+ (transients are always in the same layer)
+ */
+ while (selected->modal && (p = client_direct_parent(selected)))
selected = p;
}