]> git.sur5r.net Git - i3/i3/blobdiff - src/tree.c
Make cmd_resize_tiling_width_height work with pixels
[i3/i3] / src / tree.c
index 6c6a614e22d46479381e74447fd12f55dd378bb1..96766b6a4f9346e37682d44f03c45a3e84728441 100644 (file)
@@ -567,9 +567,16 @@ static bool _tree_next(Con *con, char way, orientation_t orientation, bool wrap)
         if (!workspace)
             return false;
 
-        Con *focus = con_descend_tiling_focused(workspace);
-        if (focus == workspace) {
-            focus = con_descend_focused(workspace);
+        /* Use descend_focused first to give higher priority to floating or
+         * tiling fullscreen containers. */
+        Con *focus = con_descend_focused(workspace);
+        if (focus->fullscreen_mode == CF_NONE) {
+            Con *focus_tiling = con_descend_tiling_focused(workspace);
+            /* If descend_tiling returned a workspace then focus is either a
+             * floating container or the same workspace. */
+            if (focus_tiling != workspace) {
+                focus = focus_tiling;
+            }
         }
 
         workspace_show(workspace);