]> git.sur5r.net Git - i3/i3/commitdiff
Bugfix: Don’t try to focus the container itself when closing
authorMichael Stapelberg <michael@stapelberg.de>
Sun, 4 Jul 2010 20:16:54 +0000 (22:16 +0200)
committerMichael Stapelberg <michael@stapelberg.de>
Sun, 4 Jul 2010 20:16:54 +0000 (22:16 +0200)
src/tree.c

index 5b4e883b6c6930ebd4aef9b67b2586915c09c1f2..29b857309f00d593bb90e665678dfe1b8ae4cef3 100644 (file)
@@ -145,7 +145,8 @@ void tree_close(Con *con, bool kill_window) {
         next = TAILQ_NEXT(con, focused);
         if (next == TAILQ_END(&(con->parent->nodes_head))) {
             next = con->parent;
-            while (!TAILQ_EMPTY(&(next->focus_head)))
+            while (!TAILQ_EMPTY(&(next->focus_head)) &&
+                   TAILQ_FIRST(&(next->focus_head)) != con)
                 next = TAILQ_FIRST(&(next->focus_head));
         }
     }