fix(explorer): 窗口覆盖到底部条带时把任务栏一并置脏
现象:任务栏要鼠标经过(光标行恰好落在它上面)才刷新一行。因为任务栏只在启动的 mark_all 画过一次,之后没有时钟每秒标脏,唯一能让任务栏行变脏的是窗口变化或光标自身所在行。窗口在 render_range 里是画在任务栏**之上**的,所以窗口覆盖到底部条带时必须连带标记任务栏条带,否则残留旧窗口内容、也无法恢复。
This commit is contained in:
1 parent
e1d31c3dc9
commit
3945decc2d
1 file changed
+5
@@ -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
|
||||
|
||||
Reference in new issue
Block a user