]> git.sur5r.net Git - i3/i3/blobdiff - src/tree.c
Cross-output focus focus floating exception
[i3/i3] / src / tree.c
index b54f77b1ce59a4bd9668ffdd6a7ec20eea0d172f..bbd5e6a472f39f736ccf8a61c10534335ec1c666 100644 (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));