Skip to content

Restore overlay topmost persistence - #520

Merged
onehoon merged 1 commit into
mainfrom
refactor/oq-zorder-topmost-persistence
Sep 12, 2026
Merged

onehoon merged 1 commit into
mainfrom
refactor/oq-zorder-topmost-persistence

Conversation

@onehoon

@onehoon onehoon commented Sep 12, 2026

Copy link
Copy Markdown
Owner

Summary

  • Set OverlappedPresenter.IsAlwaysOnTop explicitly alongside the existing native topmost placement.
  • Preserve Z-order during warm hidden Hide() operations with SWP_NOZORDER.
  • Replace Show/Hide magic flags with named constants while preserving no-activate Show behavior.
  • Log the effective WS_EX_TOPMOST state and foreground relationship after each successful Show, warning if the style is absent.
  • Add a focused source contract regression test for the topmost/no-activate warm lifecycle.

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 reassert HWND_TOPMOST with SWP_NOACTIVATE; no Activate() or foreground-stealing workaround was added.

Validation

  • Full test suite: 2739/2739 passed.
  • Release solution build: 0 warnings, 0 errors.
  • git diff --check passed.
  • GitHub Actions hardware-independent build/test validation is expected on this head.
  • Required MSI Claw manual validation (ordinary app, 10-cycle warm Show/Hide, foreground-app change, and borderless/windowed game) is not available in this environment and remains pending.

@onehoon onehoon left a comment

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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:

  1. Ordinary Explorer/browser/WinUI/Win32 foreground app -> Show Overlay -> Overlay is visually above it and foreground remains the original app.
  2. At least 10 warm Show -> Hide -> Show cycles with no behind-window regression or focus steal.
  3. Change the foreground app while Overlay is hidden, then Show again.
  4. 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.

@onehoon

onehoon commented Sep 12, 2026

Copy link
Copy Markdown
Owner Author

Follow-up on the validation-gap review:

  • The current validation host reports Gigabyte Technology Co., Ltd. B650M K, not one of the supported MSI Claw boards.
  • The Addon/Overlay hardware lifecycle cannot be safely exercised as an MSI Claw validation run on this host.
  • I therefore did not claim Cases A-D or fabricate Overlay topmost state verified log evidence.
  • No production-code change is needed from this review because the requested behavior is already implemented and the review explicitly asks for a concrete hardware-driven code change only if a supported-path case fails.

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.

@onehoon
onehoon marked this pull request as ready for review September 12, 2026 13:24
@onehoon
onehoon merged commit 7eba9fa into main Sep 12, 2026
1 check passed
@onehoon
onehoon deleted the refactor/oq-zorder-topmost-persistence branch September 13, 2026 09:01
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