diff options
author | 2023-06-27 22:50:25 +0530 | |
---|---|---|
committer | 2023-06-27 14:40:57 -0700 | |
commit | 20ffe545bab3fe518d8d1be00949943f7d39cfe0 (patch) | |
tree | 901c237996019539bef5bcf1e47fec630520cc05 | |
parent | input: Move wlr_pointer_gestures_v1 to sway_input_manager (diff) | |
download | sway-20ffe545bab3fe518d8d1be00949943f7d39cfe0.tar.gz sway-20ffe545bab3fe518d8d1be00949943f7d39cfe0.tar.zst sway-20ffe545bab3fe518d8d1be00949943f7d39cfe0.zip |
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.c | 2 |
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, | |||
207 | } | 207 | } |
208 | } | 208 | } |
209 | 209 | ||
210 | if (new) { | 210 | if (new && new != active) { |
211 | ipc_send_workspace_command(bar, new->name); | 211 | ipc_send_workspace_command(bar, new->name); |
212 | 212 | ||
213 | // Since we're asking Sway to switch to 'new', it should become visible. | 213 | // Since we're asking Sway to switch to 'new', it should become visible. |