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.
master
llyyr 2 years ago committed by Ronan Pigott
parent 20c91335f6
commit 20ffe545ba

@ -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); ipc_send_workspace_command(bar, new->name);
// Since we're asking Sway to switch to 'new', it should become visible. // Since we're asking Sway to switch to 'new', it should become visible.

Loading…
Cancel
Save