From 384ab6e75f98929c0e8f9478f8a2b6f01a70c507 Mon Sep 17 00:00:00 2001 From: TermiNexus Date: Sat, 17 Oct 2026 11:25:43 +0800 Subject: [PATCH] =?UTF-8?q?fix(desk):=20ring=5Fpush/ring=5Fpop=20=E6=BC=8F?= =?UTF-8?q?=E6=8B=B7=20style=20=E5=AD=97=E6=AE=B5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 根因:两个环函数是**逐字段拷贝**(type/win/pid/a/b/c/d + title),新增 DeskMsg.style 时没有同步补上。于是 app 侧正确写入 _msg.style(IR 已核对:store 到字段 7),但入队时被丢弃;explorer 读到的永远是共享槽里的残留 0 —— 日志表现为五个 CREATE 全 style=0,而 app 侧 [vpui] set_style NZ / geometry style!=0 完全正常。补上 push/pop 两侧的 style 拷贝。 --- vpsdk/desk.vp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/vpsdk/desk.vp b/vpsdk/desk.vp index 5c40b30..408f4e3 100644 --- a/vpsdk/desk.vp +++ b/vpsdk/desk.vp @@ -158,6 +158,7 @@ def ring_push(ctrl_off: uint64, msg: DeskMsg) -> int: slot.b = msg.b slot.c = msg.c slot.d = msg.d + slot.style = msg.style string.memcpy(&slot.title, &msg.title, uint64(DESK_TITLE_MAX)) c.tail = nxt # 最后写 tail:读者以 tail 为"有货"的标志 return 0 @@ -175,6 +176,7 @@ def ring_pop(ctrl_off: uint64, out: DeskMsg*) -> int: out.b = slot.b out.c = slot.c out.d = slot.d + out.style = slot.style string.memcpy(&out.title, &slot.title, uint64(DESK_TITLE_MAX)) c.head = (c.head + uint32(1)) % c.size return 1