X-Git-Url: https://git.sur5r.net/?a=blobdiff_plain;ds=sidebyside;f=src%2Fcommands.c;h=2b6e7dfe29f3ae49a6f17ef2059513c2213a66be;hb=2451551f639b6e6b86a08d933b9a72cc66d037ca;hp=7f196bdc9da966eabb6233cd52133345192f17e3;hpb=3d6c76eb9340e2e541f2f7e3d54a5fb5458daa12;p=i3%2Fi3 diff --git a/src/commands.c b/src/commands.c index 7f196bdc..2b6e7dfe 100644 --- a/src/commands.c +++ b/src/commands.c @@ -403,16 +403,17 @@ void cmd_move_con_to_workspace_back_and_forth(I3_CMD) { } /* - * Implementation of 'move [window|container] [to] workspace '. + * Implementation of 'move [--no-auto-back-and-forth] [window|container] [to] workspace '. * */ -void cmd_move_con_to_workspace_name(I3_CMD, const char *name) { +void cmd_move_con_to_workspace_name(I3_CMD, const char *name, const char *_no_auto_back_and_forth) { if (strncasecmp(name, "__", strlen("__")) == 0) { LOG("You cannot move containers to i3-internal workspaces (\"%s\").\n", name); ysuccess(false); return; } + const bool no_auto_back_and_forth = (_no_auto_back_and_forth != NULL); owindow *current; /* We have nothing to move: @@ -432,7 +433,8 @@ void cmd_move_con_to_workspace_name(I3_CMD, const char *name) { /* get the workspace */ Con *ws = workspace_get(name, NULL); - ws = maybe_auto_back_and_forth_workspace(ws); + if (!no_auto_back_and_forth) + ws = maybe_auto_back_and_forth_workspace(ws); HANDLE_EMPTY_MATCH; @@ -447,10 +449,11 @@ void cmd_move_con_to_workspace_name(I3_CMD, const char *name) { } /* - * Implementation of 'move [window|container] [to] workspace number '. + * Implementation of 'move [--no-auto-back-and-forth] [window|container] [to] workspace number '. * */ -void cmd_move_con_to_workspace_number(I3_CMD, const char *which) { +void cmd_move_con_to_workspace_number(I3_CMD, const char *which, const char *_no_auto_back_and_forth) { + const bool no_auto_back_and_forth = (_no_auto_back_and_forth != NULL); owindow *current; /* We have nothing to move: @@ -483,7 +486,8 @@ void cmd_move_con_to_workspace_number(I3_CMD, const char *which) { workspace = workspace_get(which, NULL); } - workspace = maybe_auto_back_and_forth_workspace(workspace); + if (!no_auto_back_and_forth) + workspace = maybe_auto_back_and_forth_workspace(workspace); HANDLE_EMPTY_MATCH;