From: Ondrej Grover Date: Wed, 2 May 2012 20:27:41 +0000 (+0200) Subject: maybe_back_and_forth now sets render_tree X-Git-Tag: 4.3~228^2^2 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=edae08a4d993e40a67f76d5736dce11b91d602a4;p=i3%2Fi3 maybe_back_and_forth now sets render_tree --- diff --git a/src/commands.c b/src/commands.c index b22c16a2..77d31f82 100644 --- a/src/commands.c +++ b/src/commands.c @@ -82,7 +82,7 @@ static Output *get_output_from_string(Output *current_output, const char *output * and return true, signaling that no further workspace switching should occur in the calling function. * */ -static bool maybe_back_and_forth(char *name) { +static bool maybe_back_and_forth(struct CommandResult *cmd_output, char *name) { Con *ws = con_get_workspace(focused); /* If we switched to a different workspace, do nothing */ @@ -90,9 +90,11 @@ static bool maybe_back_and_forth(char *name) { return false; DLOG("This workspace is already focused.\n"); - if (config.workspace_auto_back_and_forth) - workspace_back_and_forth(); - return true; + if (config.workspace_auto_back_and_forth) { + workspace_back_and_forth(); + cmd_output->needs_tree_render = true; + } + return true; } // This code is commented out because we might recycle it for popping up error @@ -802,13 +804,13 @@ void cmd_workspace_number(I3_CMD, char *which) { ysuccess(true); /* terminate the which string after the endposition of the number */ *endptr = '\0'; - if (maybe_back_and_forth(which)) + if (maybe_back_and_forth(cmd_output, which)) return; workspace_show_by_name(which); cmd_output->needs_tree_render = true; return; } - if (maybe_back_and_forth(which)) + if (maybe_back_and_forth(cmd_output, which)) return; workspace_show(workspace); @@ -841,8 +843,8 @@ void cmd_workspace_name(I3_CMD, char *name) { } DLOG("should switch to workspace %s\n", name); - if (maybe_back_and_forth(name)) - return; + if (maybe_back_and_forth(cmd_output, name)) + return; workspace_show_by_name(name); cmd_output->needs_tree_render = true;