Cross-output focus focus floating exception

Focusing across outputs with `focus [direction]` should focus an
existing floating con when no tiling con exists on the output in
[direction].
This commit is contained in:
Tony Crisci
2014-06-20 05:19:30 -04:00
committed by Michael Stapelberg
parent 682fb0a291
commit 14ec68526b
2 changed files with 55 additions and 0 deletions

View File

@ -582,6 +582,13 @@ static bool _tree_next(Con *con, char way, orientation_t orientation, bool wrap)
return true;
Con *focus = con_descend_direction(workspace, direction);
/* special case: if there was no tiling con to focus and the workspace
* has a floating con in the focus stack, focus the top of the focus
* stack (which may be floating) */
if (focus == workspace)
focus = con_descend_focused(workspace);
if (focus) {
con_focus(focus);
x_set_warp_to(&(focus->rect));