Skip to content

Fix click-through hit testing#5

Merged
SteffenCarlsen merged 1 commit into
mainfrom
feature/click-through-hit-test
Jun 1, 2026
Merged

Fix click-through hit testing#5
SteffenCarlsen merged 1 commit into
mainfrom
feature/click-through-hit-test

Conversation

@SteffenCarlsen

Copy link
Copy Markdown
Owner

Fixes OverlayInputMode.ClickThrough so WM_NCHITTEST returns HTTRANSPARENT directly instead of HTCLIENT. This keeps the explicit hit-test path aligned with WS_EX_TRANSPARENT behavior. Validation: dotnet test tests\ModernOverlay.Tests\ModernOverlay.Tests.csproj --configuration Debug --filter ClickThroughNcHitTestReturnsTransparent.

Copilot AI review requested due to automatic review settings June 1, 2026 13:03

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull request overview

Fixes click-through hit testing so OverlayInputMode.ClickThrough returns HTTRANSPARENT for WM_NCHITTEST, aligning explicit hit-test behavior with WS_EX_TRANSPARENT semantics.

Changes:

  • Update input-region resolution to treat ClickThrough as always pass-through.
  • Add a Windows integration test asserting WM_NCHITTEST returns HTTRANSPARENT in click-through mode.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.

File Description
src/ModernOverlay/OverlayWindow.cs Adjusts ResolveInputRegion to return pass-through for ClickThrough, ensuring WM_NCHITTEST maps to HTTRANSPARENT.
tests/ModernOverlay.Tests/OverlayWindowThreadingTests.cs Adds a regression test validating WM_NCHITTEST behavior for click-through overlays.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@SteffenCarlsen SteffenCarlsen merged commit 93e773c into main Jun 1, 2026
2 checks passed
@SteffenCarlsen SteffenCarlsen deleted the feature/click-through-hit-test branch June 1, 2026 13:14
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.

2 participants