when focusing or raising a window which is modal child for a direct parent, raise its parent and move it to the top of the stacking order too, ie. treat them like one window (this is already done elsewhere, like when moving between desktops for example)
This commit is contained in:
parent
751f85003f
commit
a19f2f8bc9
2 changed files with 17 additions and 0 deletions
|
@ -57,6 +57,14 @@ void focus_shutdown(gboolean reconfig)
|
|||
|
||||
static void push_to_top(ObClient *client)
|
||||
{
|
||||
ObClient *p;
|
||||
|
||||
/* 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)))
|
||||
push_to_top(p);
|
||||
|
||||
focus_order = g_list_remove(focus_order, client);
|
||||
focus_order = g_list_prepend(focus_order, client);
|
||||
}
|
||||
|
|
|
@ -221,6 +221,15 @@ static void restack_windows(ObClient *selected, gboolean raise)
|
|||
GList *modals = NULL;
|
||||
GList *trans = NULL;
|
||||
|
||||
if (raise) {
|
||||
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)))
|
||||
selected = p;
|
||||
}
|
||||
|
||||
/* remove first so we can't run into ourself */
|
||||
it = g_list_find(stacking_list, selected);
|
||||
g_assert(it);
|
||||
|
|
Loading…
Reference in a new issue