fix(bar): 修复点击 workspace 末尾 layout 单元无法切换布局的 bug
This commit is contained in:
@@ -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};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user