aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorllyyr <llyyr.public@gmail.com>2023-06-27 22:50:25 +0530
committerRonan Pigott <ronan@rjp.ie>2023-06-27 14:40:57 -0700
commit20ffe545bab3fe518d8d1be00949943f7d39cfe0 (patch)
tree901c237996019539bef5bcf1e47fec630520cc05
parent20c91335f6ba515e43b444fafd52b822bd460eda (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.