From: Michael Stapelberg Date: Tue, 1 Feb 2011 16:17:50 +0000 (+0100) Subject: Bugfix: Correctly focus con when moving to another workspace (Thanks mseed) X-Git-Tag: tree-pr2~66 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=d855bea21544ef860b7f59110cc76159013c9ef9;p=i3%2Fi3 Bugfix: Correctly focus con when moving to another workspace (Thanks mseed) This fixes #310. --- diff --git a/src/con.c b/src/con.c index 5953c8c6..c04d281e 100644 --- a/src/con.c +++ b/src/con.c @@ -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");