fix(config): 修复 rule_action 合法性校验 bug
This commit is contained in:
@@ -104,14 +104,12 @@ static bool rule_action_valid(const rule_action_t *action,
|
|||||||
size_t workspace_count) {
|
size_t workspace_count) {
|
||||||
if (!action) return false;
|
if (!action) return false;
|
||||||
|
|
||||||
bool flag_valid = action->switch_to_workspace || action->fullscreen ||
|
|
||||||
action->maximize || action->floating;
|
|
||||||
|
|
||||||
if (action->workspace == ZDWM_WORKSPACE_ID_INVALID) {
|
if (action->workspace == ZDWM_WORKSPACE_ID_INVALID) {
|
||||||
return flag_valid;
|
return action->switch_to_workspace || action->fullscreen ||
|
||||||
} else {
|
action->maximize || action->floating;
|
||||||
return action->workspace < workspace_count && flag_valid;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
return action->workspace < workspace_count;
|
||||||
}
|
}
|
||||||
|
|
||||||
static bool runtime_config_add_rule(zdwm_config_builder_t *builder,
|
static bool runtime_config_add_rule(zdwm_config_builder_t *builder,
|
||||||
|
|||||||
Reference in New Issue
Block a user