Bugfix: Correctly focus con when moving to another workspace (Thanks mseed)

This fixes #310.
next
Michael Stapelberg 2011-02-01 17:17:50 +01:00
parent 97ab44b3d8
commit d855bea215
1 changed files with 6 additions and 2 deletions

View File

@ -515,10 +515,14 @@ void con_move_to_workspace(Con *con, Con *workspace) {
con->percent = 0.0;
con_fix_percent(next);
/* 7: keep focus on the current workspace */
/* 7: focus the con on the target workspace (the X focus is only updated by
* calling tree_render(), so for the "real" focus this is a no-op) */
con_focus(con);
/* 8: keep focus on the current workspace */
con_focus(focus_next);
/* 8: check if the parent container is empty now and close it */
/* 9: check if the parent container is empty now and close it */
if (parent->type != CT_WORKSPACE &&
TAILQ_EMPTY(&(parent->nodes_head))) {
DLOG("Closing empty parent container\n");