From: Michael Stapelberg Date: Sun, 4 Jul 2010 20:16:54 +0000 (+0200) Subject: Bugfix: Don’t try to focus the container itself when closing X-Git-Tag: tree-pr1~161 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=66480d372596a489629de6aac19d704f70dae321;p=i3%2Fi3 Bugfix: Don’t try to focus the container itself when closing --- 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)); } }