From 66480d372596a489629de6aac19d704f70dae321 Mon Sep 17 00:00:00 2001 From: Michael Stapelberg Date: Sun, 4 Jul 2010 22:16:54 +0200 Subject: [PATCH] =?utf8?q?Bugfix:=20Don=E2=80=99t=20try=20to=20focus=20the?= =?utf8?q?=20container=20itself=20when=20closing?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- src/tree.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/tree.c b/src/tree.c index 5b4e883b..29b85730 100644 --- a/src/tree.c +++ b/src/tree.c @@ -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)); } } -- 2.39.5