From 195aeb5166c7715409fe18752f3856305f4b2646 Mon Sep 17 00:00:00 2001 From: Zedhugh Chen Date: Tue, 23 Jun 2026 07:01:23 +0800 Subject: [PATCH] =?UTF-8?q?fix(bar):=20=E4=BF=AE=E5=A4=8D=E7=82=B9?= =?UTF-8?q?=E5=87=BB=20workspace=20=E6=9C=AB=E5=B0=BE=20layout=20=E5=8D=95?= =?UTF-8?q?=E5=85=83=E6=97=A0=E6=B3=95=E5=88=87=E6=8D=A2=E5=B8=83=E5=B1=80?= =?UTF-8?q?=E7=9A=84=20bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/bar/workspaces.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/src/bar/workspaces.c b/src/bar/workspaces.c index 1f1d686..47f310e 100644 --- a/src/bar/workspaces.c +++ b/src/bar/workspaces.c @@ -149,9 +149,15 @@ static zdwm_action_t bar_workspace_on_click( int32_t x, void *state ) { - auto data = (bar_workspace_state_t *)state; - auto workspace = &data->workspaces[cell_index]; + auto data = (bar_workspace_state_t *)state; + if (cell_index == data->count) { + return (zdwm_action_t){ + .type = ZDWM_ACTION_LAYOUT_CYCLE, + .as.layout_cycle = {.delta = 1}, + }; + } + auto workspace = &data->workspaces[cell_index]; if (workspace->info.id == data->workspace_id) { return (zdwm_action_t){.type = ZDWM_ACTION_NONE}; }