From d855bea21544ef860b7f59110cc76159013c9ef9 Mon Sep 17 00:00:00 2001 From: Michael Stapelberg Date: Tue, 1 Feb 2011 17:17:50 +0100 Subject: [PATCH] Bugfix: Correctly focus con when moving to another workspace (Thanks mseed) This fixes #310. --- src/con.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) 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"); -- 2.39.5