Skip to content

Commit 20ffe54

Browse files
llyyrrpigott
authored andcommitted
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.
1 parent 20c9133 commit 20ffe54

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

swaybar/input.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -207,7 +207,7 @@ static void workspace_next(struct swaybar *bar, struct swaybar_output *output,
207207
}
208208
}
209209

210-
if (new) {
210+
if (new && new != active) {
211211
ipc_send_workspace_command(bar, new->name);
212212

213213
// Since we're asking Sway to switch to 'new', it should become visible.

0 commit comments

Comments
 (0)