aboutsummaryrefslogtreecommitdiff
path: root/sway
diff options
context:
space:
mode:
authorRagnar Groot Koerkamp <ragnar.grootkoerkamp@gmail.com>2021-06-17 15:01:51 +0200
committerSimon Ser <contact@emersion.fr>2021-06-18 09:37:28 +0200
commit771cff23fb70873dbf5a5690f0bc20e545d1b839 (patch)
tree2b1209ce452c1325181be0240b3d414a8e933db5 /sway
parentd13090be546d19d487c872f7bc79bb98f8e17873 (diff)
Fix #6299 Disable auto_back_and_forth for next_on_output
This forces no_auto_back_and_forth to true for `workspace next_on_output` and `workspace prev_on_output` to keep parity with i3. In i3, running next_on_output never changes focus to another output. In Sway currently, with workspace_auto_back_and_forth set to yet, running next_on_output on an output with only a single active workspace will typically end up focussing the other output: 1. next_on_output focusses the current workspace, because it's the only one 2. auto_back_and_forth focusses the last focussed workspace, because the current workspace to focus is the current one. This will usually be on the other monitor if the workspace there was last focussed.
Diffstat (limited to 'sway')
-rw-r--r--sway/commands/workspace.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/sway/commands/workspace.c b/sway/commands/workspace.c
index 2858a284..bf6b7e04 100644
--- a/sway/commands/workspace.c
+++ b/sway/commands/workspace.c
@@ -215,8 +215,10 @@ struct cmd_results *cmd_workspace(int argc, char **argv) {
ws = workspace_by_name(argv[0]);
} else if (strcasecmp(argv[0], "next_on_output") == 0) {
ws = workspace_output_next(current, create);
+ no_auto_back_and_forth = true;
} else if (strcasecmp(argv[0], "prev_on_output") == 0) {
ws = workspace_output_prev(current, create);
+ no_auto_back_and_forth = true;
} else if (strcasecmp(argv[0], "back_and_forth") == 0) {
if (!seat->prev_workspace_name) {
return cmd_results_new(CMD_INVALID,