Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix ICustomHitTest #5923

Merged
merged 7 commits into from
May 18, 2021
Merged

Fix ICustomHitTest #5923

merged 7 commits into from
May 18, 2021

Conversation

mat1jaczyyy
Copy link
Contributor

What does the pull request do?

ICustomHitTest wasn't being handled correctly when using deferred renderer. Immediate renderer functions as intended.

What is the current behavior?

Deferred renderer passes incorrectly translated points for clipping, and for actual hit testing doesn't test at all.

What is the updated/expected behavior with this PR?

A repro is provided in #5879. Deferred renderer now passes non-translated points and does actual hit testing. On an slightly less related note, upon inspection it's possible to expand the hit window using this interface, so I've removed an old comment which claimed it was not possible. This is intended behavior.

Checklist

Breaking changes

People using deferred renderer will now have non-translated points passed to HitTest.

Fixed issues

Fixes #5879

@dnfadmin
Copy link

dnfadmin commented May 14, 2021

CLA assistant check
All CLA requirements met.

@grokys grokys requested a review from MarchingCube May 15, 2021 23:51
Copy link
Collaborator

@MarchingCube MarchingCube left a comment

Choose a reason for hiding this comment

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

LGTM.

@maxkatz6 maxkatz6 merged commit 86488e6 into master May 18, 2021
@maxkatz6 maxkatz6 deleted the fixes/5879-icustomhittest branch May 18, 2021 00:26
danwalmsley pushed a commit that referenced this pull request May 19, 2021
@@ -311,8 +312,7 @@ private bool FilterAndClip(IVisualNode node, ref Rect? clip)

if (!clipped && node.Visual is ICustomHitTest custom)
Copy link
Collaborator

Choose a reason for hiding this comment

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

What about ICustomSimpleHitTest ?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

nice catch

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.

ICustomHitTest not working
7 participants