refactor(policy): 删除 action 模块,将 action -> command 解析放在 policy 模块内部

- 删除 src/core/action.c|h,将 spawn 移至 src/base/process
- policy_resolve_action 实现完整的 action 分发逻辑
- binding_table_cycle_mode 改为纯计算,返回模式 ID 而非修改状态
- 从 state 移除 state_workspace_cycle_layout / state_cycle_current_output
- 新增 ZDWM_COMMAND_QUIT 命令,通过 plan 标志驱动 runtime 退出
- set_binding_mode 现在生成 BIND_KEY effect 以同步后端按键绑定
- 扩展 action 数据类型支持 window_send_to_workspace 和 window_cycle_output
This commit is contained in:
2026-05-27 01:12:04 +08:00
parent ff3b51fd1d
commit 09d5e4b4d0
14 changed files with 497 additions and 368 deletions

View File

@@ -36,8 +36,11 @@ void plan_reset(plan_t *plan) {
void plan_cleanup(plan_t *plan) {
free_memory_hold_by_effects(plan->effects, plan->count);
p_delete(&plan->effects);
plan->count = 0;
plan->capacity = 0;
plan->count = 0;
plan->capacity = 0;
plan->need_relayout = false;
plan->quit = false;
plan->will_restart = false;
}
void plan_push_effect(plan_t *plan, const effect_t *effect) {