Skip to content

Propagate Popup.IsHitTestVisible to IPopupImpl to skip hit-testing popups on the OS level if available - #21916

Merged
MrJul merged 2 commits into
mainfrom
feature/popup-no-hittest
Aug 3, 2026
Merged

MrJul merged 2 commits into
mainfrom
feature/popup-no-hittest

Conversation

@kekekeks

@kekekeks kekekeks commented Aug 3, 2026 •

Copy link
Copy Markdown
Member

Win32: return HTTRANSPARENT. Opted out of using WS_EX_TRANSPARENT because it will be a can of worms with our zoo of presentation methods
macOS: NSWindow conveniently has setIgnoresMouseEvents
X11/Wayland: empty input region

Why not enable it for Window as well - not sure how well it will play with decorations, especially with macos that removes hit-testing on the whole NSWndow

/// </summary>
static Popup()
{
IsHitTestVisibleProperty.OverrideDefaultValue<Popup>(false);

@kekekeks kekekeks Aug 3, 2026 •

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Note that it was an old hack from 2016 to prevent ImmediateRenderer from hit-testing on Popup itself (which has no content of its own in the host tree, but still counted as control with width and height.

@maxkatz6

maxkatz6 commented Aug 3, 2026

Copy link
Copy Markdown
Member

Assuming this is a backport candidate for XPF, do we want to make IsHitTestVisible set to true by default on ToolTips with 12.2+ (without backporting)?

@kekekeks

kekekeks commented Aug 3, 2026 •

Copy link
Copy Markdown
Member Author

I think it makes sense to enable it for tooltips, yes. In a separate PR though

@kekekeks kekekeks added the backport-candidate-11.3.x Consider this PR for backporting to 11.3 branch label Aug 3, 2026
@MrJul MrJul added the backport-candidate-12.1.x Consider this PR for backporting to 12.1 branch label Aug 3, 2026
@MrJul
MrJul enabled auto-merge August 3, 2026 17:44
@MrJul
MrJul added this pull request to the merge queue Aug 3, 2026
@avaloniaui-bot

Copy link
Copy Markdown

You can test this PR using the following package version. 12.2.999-cibuild0068065-alpha. (feed url: https://nuget-feed-all.avaloniaui.net/v3/index.json) [PRBUILDID]

Merged via the queue into main with commit 9aed2da Aug 3, 2026
11 checks passed
@MrJul
MrJul deleted the feature/popup-no-hittest branch August 3, 2026 19:07
MrJul pushed a commit that referenced this pull request Aug 5, 2026
…pups on the OS level if available (#21916)

* Propagate Popup.IsHitTestVisible to IPopupImpl to skip hit-testing popups on the OS level if available

* I hate our api diff system
@MrJul MrJul added backported-11.3.x and removed backport-candidate-11.3.x Consider this PR for backporting to 11.3 branch labels Aug 5, 2026
MrJul pushed a commit to MrJul/Avalonia that referenced this pull request Sep 2, 2026
…pups on the OS level if available (AvaloniaUI#21916)

* Propagate Popup.IsHitTestVisible to IPopupImpl to skip hit-testing popups on the OS level if available

* I hate our api diff system
@MrJul MrJul added backported-12.1.x and removed backport-candidate-12.1.x Consider this PR for backporting to 12.1 branch labels Sep 2, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants