+ if (moves_focus) {
+ /* workspace_show will not correctly update the active workspace because
+ * the focused container, con, is now a child of ws. To work around this
+ * and still produce the correct workspace focus events (see
+ * 517-regress-move-direction-ipc.t) we need to temporarily set focused
+ * to the old workspace. */
+ focused = old_ws;
+ workspace_show(ws);
+ con_focus(con);
+ }