Raise floating window to top when it gets focus

Applied for:
1. '[...] focus' for a floating container raises it to the top.
2. Focusing a window through a focus event raises it to the top.

Fixes #2572
This commit is contained in:
Orestis Floros
2017-09-22 22:00:06 +03:00
parent bf7aeced30
commit 76214b04e8
4 changed files with 36 additions and 5 deletions

View File

@ -243,6 +243,13 @@ void con_focus(Con *con) {
workspace_update_urgent_flag(con_get_workspace(con));
ipc_send_window_event("urgent", con);
}
/* Focusing a container with a floating parent should raise it to the top. Since
* con_focus is called recursively for each parent we don't need to use
* con_inside_floating(). */
if (con->type == CT_FLOATING_CON) {
floating_raise_con(con);
}
}
/*