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

@ -262,8 +262,6 @@ static int route_click(Con *con, xcb_button_press_event_t *event, const bool mod
* We will skip handling events on floating cons in fullscreen mode */
Con *fs = (ws ? con_get_fullscreen_con(ws, CF_OUTPUT) : NULL);
if (floatingcon != NULL && fs != con) {
floating_raise_con(floatingcon);
/* 4: floating_modifier plus left mouse button drags */
if (mod_pressed && event->detail == XCB_BUTTON_CLICK_LEFT) {
floating_drag_window(floatingcon, event);