Restore overlay topmost persistence - #520
Conversation
onehoon
left a comment
There was a problem hiding this comment.
Blocking validation gap: the implementation matches the OQ-ZORDER-A code contract on review, but this PR is not merge-ready yet because the work order explicitly requires real MSI Claw validation for this hardware-observed Z-order regression, and the PR body says that validation is still pending.
The new source-contract test proves that IsAlwaysOnTop, HWND_TOPMOST, SWP_NOACTIVATE, and SWP_NOZORDER are present in the source, but it cannot prove the actual user-visible invariant that motivated this PR: the Overlay must stay above an ordinary foreground app / supported borderless-windowed game without stealing foreground, including across the warm hidden Show/Hide lifecycle.
Before merge, please run and record the required device cases from the work order:
- Ordinary Explorer/browser/WinUI/Win32 foreground app -> Show Overlay -> Overlay is visually above it and foreground remains the original app.
- At least 10 warm Show -> Hide -> Show cycles with no behind-window regression or focus steal.
- Change the foreground app while Overlay is hidden, then Show again.
- One supported borderless/windowed game: Overlay above the game, game not minimized, no foreground steal, normal controller publication restored after close.
Please attach the resulting Overlay log evidence to the PR. The successful path should contain evidence equivalent to:
[DEBUG] [Window] Overlay topmost state verified. OverlayHwnd=<...> TopmostStyle=True ForegroundHwnd=<...> IsOverlayForeground=False
No production-code change is requested by this review unless one of those supported-path cases fails. If a case does fail, use that concrete log/hardware sequence to drive the smallest follow-up code change rather than adding polling, retries, a Z-order manager, or activation workarounds.
|
Follow-up on the validation-gap review:
The PR remains open/Draft with the required MSI Claw manual validation pending: ordinary foreground app, 10 warm Show/Hide cycles, foreground-app change while hidden, and one supported borderless/windowed game with the resulting Overlay log attached. |
Summary
OverlappedPresenter.IsAlwaysOnTopexplicitly alongside the existing native topmost placement.Hide()operations withSWP_NOZORDER.WS_EX_TOPMOSTstate and foreground relationship after each successful Show, warning if the style is absent.Scope
This is an Overlay HWND presentation fix centered on
WindowInterop. It does not change controller authority, Runtime lifecycle, QAM, mappings, activation behavior, foreground ownership, or add polling/watchdog/manager abstractions.ShowWithoutActivation()continues to reassertHWND_TOPMOSTwithSWP_NOACTIVATE; noActivate()or foreground-stealing workaround was added.Validation
git diff --checkpassed.