swaybar: don't set current workspace as not visible

When `wrap_scroll yes` is configured and there's only one workspace
open, swaybar will mark it as not visible if the user scrolls on it and
eventually incorrectly fail the `active->visible` assert.
Fix this by making sure that new and current workspace aren't the same.
This commit is contained in:
llyyr 2023-06-27 22:50:25 +05:30 committed by Ronan Pigott
parent 20c91335f6
commit 20ffe545ba
1 changed files with 1 additions and 1 deletions

View File

@ -207,7 +207,7 @@ static void workspace_next(struct swaybar *bar, struct swaybar_output *output,
}
}
if (new) {
if (new && new != active) {
ipc_send_workspace_command(bar, new->name);
// Since we're asking Sway to switch to 'new', it should become visible.