fix(bar): 修复点击 workspace 末尾 layout 单元无法切换布局的 bug

This commit is contained in:
zedhugh committed 2026-06-23 07:01:23 +08:00
1 parent af80181897
commit 195aeb5166
1 file changed
+7 -1
+7 -1
View File
@@ -150,8 +150,14 @@ static zdwm_action_t bar_workspace_on_click(
void *state
) {
auto data = (bar_workspace_state_t *)state;
auto workspace = &data->workspaces[cell_index];
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};
}