From 20ffe545bab3fe518d8d1be00949943f7d39cfe0 Mon Sep 17 00:00:00 2001 From: llyyr Date: Tue, 27 Jun 2023 22:50:25 +0530 Subject: [PATCH] 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. --- swaybar/input.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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.