sway

i3-compatible Wayland compositor
git clone https://git.awy.one/sway
Log | Files | Refs | README | LICENSE

commit 771cff23fb70873dbf5a5690f0bc20e545d1b839
parent d13090be546d19d487c872f7bc79bb98f8e17873
Author: Ragnar Groot Koerkamp <ragnar.grootkoerkamp@gmail.com>
Date:   Thu, 17 Jun 2021 15:01:51 +0200

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:
Msway/commands/workspace.c | 2++
1 file changed, 2 insertions(+), 0 deletions(-)

diff --git 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,