aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFurkan Sahin <furkan-dev@proton.me>2023-06-27 22:50:25 +0530
committerFurkan Sahin <furkan-dev@proton.me>2023-06-27 22:50:25 +0530
commitafd3694301ca1730c51625823f52c8dee279c294 (patch)
tree901c237996019539bef5bcf1e47fec630520cc05
parent348963d0a8a15f7eff8189e5c470cc7b6ed6919b (diff)
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.
-rw-r--r--swaybar/input.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/swaybar/input.c b/swaybar/input.c
index f8f0672e..358c69cb 100644
--- a/swaybar/input.c
+++ b/swaybar/input.c
@@ -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.