Bugfix: Keep focus on the current workspace when moving containers, add testcase

This commit is contained in:
Michael Stapelberg
2010-07-17 13:27:34 +02:00
parent 49add4f3e4
commit 099df7f438
4 changed files with 96 additions and 17 deletions

View File

@ -138,20 +138,7 @@ void tree_close(Con *con, bool kill_window) {
fix_floating_parent(croot, con);
/* Get the container which is next focused */
Con *next;
if (con->type == CT_FLOATING_CON) {
next = TAILQ_NEXT(con, floating_windows);
if (next == TAILQ_END(&(parent->floating_head)))
next = con_get_workspace(con);
} else {
next = TAILQ_NEXT(con, focused);
if (next == TAILQ_END(&(parent->nodes_head))) {
next = parent;
while (!TAILQ_EMPTY(&(next->focus_head)) &&
TAILQ_FIRST(&(next->focus_head)) != con)
next = TAILQ_FIRST(&(next->focus_head));
}
}
Con *next = con_next_focused(con);
DLOG("closing %p, kill_window = %d\n", con, kill_window);
Con *child;