From 3945decc2d8b0466f0ecc8396be73e2b8955eac9 Mon Sep 17 00:00:00 2001 From: TermiNexus Date: Fri, 16 Oct 2026 22:17:25 +0800 Subject: [PATCH] =?UTF-8?q?fix(explorer):=20=E7=AA=97=E5=8F=A3=E8=A6=86?= =?UTF-8?q?=E7=9B=96=E5=88=B0=E5=BA=95=E9=83=A8=E6=9D=A1=E5=B8=A6=E6=97=B6?= =?UTF-8?q?=E6=8A=8A=E4=BB=BB=E5=8A=A1=E6=A0=8F=E4=B8=80=E5=B9=B6=E7=BD=AE?= =?UTF-8?q?=E8=84=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 现象:任务栏要鼠标经过(光标行恰好落在它上面)才刷新一行。因为任务栏只在启动的 mark_all 画过一次,之后没有时钟每秒标脏,唯一能让任务栏行变脏的是窗口变化或光标自身所在行。窗口在 render_range 里是画在任务栏**之上**的,所以窗口覆盖到底部条带时必须连带标记任务栏条带,否则残留旧窗口内容、也无法恢复。 --- Apps/Explorer/desk_server.vp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/Apps/Explorer/desk_server.vp b/Apps/Explorer/desk_server.vp index eb0135a..5fb0bb8 100644 --- a/Apps/Explorer/desk_server.vp +++ b/Apps/Explorer/desk_server.vp @@ -192,6 +192,10 @@ class DeskServer: # 窗口移动/增删时连同阴影一起置脏(阴影超出窗口外框) def mark_win(self, y: int, h: int): self.mark(y - SHADOW_TOP, h + SHADOW_TOP + SHADOW_BOTTOM) + # 窗口画在任务栏之上,覆盖到底部条带时必须把任务栏一并置脏,否则残留旧内容。 + tb: int = self.fb_h - TASKBAR_H + if y + h + SHADOW_BOTTOM > tb: + self.mark(tb, TASKBAR_H) # 活动窗口切换会改变标题栏配色:把所有窗口的标题栏行置脏 def mark_titles(self): @@ -662,6 +666,7 @@ class DeskServer: y += 1 def render(self): + global _vblank_logged if self.dirty_any == 0: return y0: int = -1 y1: int = -1