]> git.sur5r.net Git - i3/i3/commitdiff
Remove TODO for cycling through the floating z-index.
authorMichael Stapelberg <michael@stapelberg.de>
Sun, 20 Jul 2014 21:49:08 +0000 (23:49 +0200)
committerMichael Stapelberg <michael@stapelberg.de>
Sun, 20 Jul 2014 21:49:08 +0000 (23:49 +0200)
I think this is not a good feature to have. It shouldn’t be necessary
for a tiling window manager that explicitly discourages the use of
floating windows.

fixes #1324

src/tree.c

index bbd5e6a472f39f736ccf8a61c10534335ec1c666..6e289790b80da317a137a9980f4c7c50482f6481 100644 (file)
@@ -599,33 +599,30 @@ static bool _tree_next(Con *con, char way, orientation_t orientation, bool wrap)
     Con *parent = con->parent;
 
     if (con->type == CT_FLOATING_CON) {
+        if (orientation != HORIZ)
+            return false;
+
         /* left/right focuses the previous/next floating container */
-        if (orientation == HORIZ) {
-            Con *next;
+        Con *next;
+        if (way == 'n')
+            next = TAILQ_NEXT(con, floating_windows);
+        else
+            next = TAILQ_PREV(con, floating_head, floating_windows);
+
+        /* If there is no next/previous container, wrap */
+        if (!next) {
             if (way == 'n')
-                next = TAILQ_NEXT(con, floating_windows);
+                next = TAILQ_FIRST(&(parent->floating_head));
             else
-                next = TAILQ_PREV(con, floating_head, floating_windows);
-
-            /* If there is no next/previous container, wrap */
-            if (!next) {
-                if (way == 'n')
-                    next = TAILQ_FIRST(&(parent->floating_head));
-                else
-                    next = TAILQ_LAST(&(parent->floating_head), floating_head);
-            }
-
-            /* Still no next/previous container? bail out */
-            if (!next)
-                return false;
+                next = TAILQ_LAST(&(parent->floating_head), floating_head);
+        }
 
-            con_focus(con_descend_focused(next));
-            return true;
-        } else {
-            /* up/down cycles through the Z-index */
-            /* TODO: implement cycling through the z-index */
+        /* Still no next/previous container? bail out */
+        if (!next)
             return false;
-        }
+
+        con_focus(con_descend_focused(next));
+        return true;
     }
 
     /* If the orientation does not match or there is no other con to focus, we