From a89613d37d6bb2f69e734f87427439a39697feb2 Mon Sep 17 00:00:00 2001 From: Zedhugh Chen Date: Sun, 5 Apr 2026 23:25:25 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E6=9B=B4=E6=94=B9=20window=20=E7=9B=B8?= =?UTF-8?q?=E5=85=B3=E6=8E=A5=E5=8F=A3=E6=B3=A8=E9=87=8A=E4=BD=BF=E5=85=B6?= =?UTF-8?q?=E4=B8=8E=E6=9C=80=E6=96=B0=E7=9A=84=E7=AA=97=E5=8F=A3=E5=A0=86?= =?UTF-8?q?=E5=8F=A0=E6=96=B9=E6=A1=88=E9=80=82=E9=85=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/core/state.h | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/src/core/state.h b/src/core/state.h index d6b2a16..943c77e 100644 --- a/src/core/state.h +++ b/src/core/state.h @@ -130,21 +130,20 @@ bool state_output_valid(const state_t *state, output_id_t id); /* * state 持有的 window 集合接口 * - * TODO: 这组接口负责管理 state_t.windows[] 容器本身,并维护当前过渡期的 - * stack_order[] 视图;后续会切换到 layer stack 为主。 - * 对外只提供只读访问。 + * 这组接口负责管理 state_t.windows[] 容器本身,并维护分层的堆叠顺序。 + * 接口返回的 window 对象仅提供只读访问。 * window 的运行期可变状态必须通过专门的 state 级更新接口修改。 */ /* - * TODO: 添加窗口,并将其追加到当前过渡期的 stack_order[] 顶部。 + * 添加窗口,并将其追加到对应堆栈顶部 * - * info 提供 backend 已探测到的窗口基础信息。 + * info 提供窗口的基础信息 * workspace 归属与其他策略相关字段由后续 state_window_* 接口设置。 */ const window_t *state_window_add(state_t *state, const window_info_t *info); const window_t *state_window_get(const state_t *state, window_id_t id); const window_t *state_window_at(const state_t *state, size_t index); -/* TODO: 删除窗口,并同步从当前过渡期的 stack_order[] 中移除。 */ +/* 删除窗口,并同步将其从对应的堆叠栈中移除 */ void state_window_remove(state_t *state, window_id_t id); size_t state_window_count(const state_t *state);