Skip to content

fix(installer-ui): 切换窗口时旧标题栏浮现(WM_NCACTIVATE 非客户区重绘) - #126

Merged
Yundi339 merged 1 commit into
mainfrom
fix/installer-wm-ncactivate
Nov 29, 2026
Merged

Yundi339 merged 1 commit into
mainfrom
fix/installer-wm-ncactivate

Conversation

@Yundi339

Copy link
Copy Markdown
Member

说明

安装器窗口(foundation-setup-ui)在切换到其他窗口时,旧的系统标题栏会浮现到透明边距上(ffwin11 实测)。原因是焦点切换序列 WM_NCACTIVATE → WM_NCPAINT → DefWindowProc 会重绘旧式非客户区;而安装器页面自己绘制了整窗内容(标题区、圆角卡片与阴影都在页面内),系统这一步画出来的正是已弃用的方角标题栏。

修改

  • keep_fixed_size 的窗口子类拦截 WM_NCACTIVATE,固定以"窗口处于激活态"(wparam=1)转发给 DefSubclassProc:系统不再绘制非激活态的旧标题栏,而真正的激活状态仍由 WM_ACTIVATE 正常处理,页面绘制不受影响。

验证

  • 本机(Windows)运行 foundation-setup-ui,用真实点击任务栏切走/切回焦点并截图对比:修复前切走后出现旧标题栏,修复后切走/切回窗口内容零变化。

@coderabbitai

coderabbitai Bot commented Nov 29, 2026

Copy link
Copy Markdown

Warning

Review limit reached

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

Next included review available in 59 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used the included review currently available.

Learn how review limits work.

Review configuration:

Run configuration

Commits

Reviewing files that changed from the base of the PR and between dadbe0f and 988db19.

Files selected for processing: 1

  • installer-ui/src/main.rs
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

@Yundi339
Yundi339 merged commit 513f9e9 into main Nov 29, 2026
10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant