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 custom hit testing #5968

Merged
merged 7 commits into from
May 31, 2021
Merged

Conversation

wieslawsoltes
Copy link
Collaborator

What does the pull request do?

Fixes custom hit-testing broken in #5923

What is the current behavior?

Custom hit testing when custom title bar is used not working.

What is the updated/expected behavior with this PR?

Fixes custom hit-testing.

How was the solution implemented (if it's not obvious)?

Check for correct interface.

Checklist

Breaking changes

Obsoletions / Deprecations

Fixed issues

@wieslawsoltes wieslawsoltes requested a review from a team May 24, 2021 08:58
Copy link
Member

@grokys grokys left a comment

Choose a reason for hiding this comment

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

Still not sure this is right, and I've been unable to test it: the description says "Custom hit testing when custom title bar is used not working." but when I run ControlCatalog and go to "Dialogs -> Decorated Window" the custom title bar seems to work fine?

First of all how do I repro the problem in order to verify the fix?

src/Avalonia.Visuals/Rendering/ICustomSimpleHitTest.cs Outdated Show resolved Hide resolved
@wieslawsoltes
Copy link
Collaborator Author

Still not sure this is right, and I've been unable to test it: the description says "Custom hit testing when custom title bar is used not working." but when I run ControlCatalog and go to "Dialogs -> Decorated Window" the custom title bar seems to work fine?

First of all how do I repro the problem in order to verify the fix?

@grokys repro:

  1. Run ControlCatalog.NetCore
  2. Got to Window Customizations page
  3. Check Extend Client Area to Decorations and Prefer System Chrome
  4. Try dragging window by titlebar

ControlCatalog NetCore_lArfFfokJP

Copy link
Member

@grokys grokys left a comment

Choose a reason for hiding this comment

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

Ok, reverted the TransformedBounds change as I've checked and this PR fixes custom title bar hit-testing on the deferred renderer without it and it was already broken on the immediate renderer before #5923, so makes no difference there either.

@grokys grokys enabled auto-merge (squash) May 31, 2021 16:27
@grokys grokys merged commit 86b9a60 into AvaloniaUI:master May 31, 2021
@wieslawsoltes wieslawsoltes deleted the FixCustomHitTesting branch May 31, 2021 16:47
danwalmsley pushed a commit that referenced this pull request Jun 4, 2021
* Fix custom hit testing
* Use ICustomHitTest as it's intended to be used in defered renderer

Co-authored-by: Dan Walmsley <dan@walms.co.uk>
Co-authored-by: Steven Kirk <grokys@users.noreply.github.com>
Co-authored-by: Steven Kirk <grokys@gmail.com>
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.

None yet

3 participants