Bugfix: Don’t try to focus the container itself when closing

next
Michael Stapelberg 2010-07-04 22:16:54 +02:00
parent 16f5c879f6
commit 66480d3725
1 changed files with 2 additions and 1 deletions

View 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));
}
}