Skip to content

ToolTips in popups (or any context where capture is active)#5931

Merged
singhashish-wpf merged 3 commits intodotnet:mainfrom
SamBent:Bug5716
Feb 1, 2022
Merged

ToolTips in popups (or any context where capture is active)#5931
singhashish-wpf merged 3 commits intodotnet:mainfrom
SamBent:Bug5716

Conversation

@SamBent
Copy link
Contributor

@SamBent SamBent commented Jan 10, 2022

Fixes #5716

Description

The new 6.0 tooltip behavior computes a "safe area" in which the user can move the mouse without dismissing the tooltip. It's computed with coordinates relative to the owner's PresentationSource (hwnd), but the mouse movements were tracked relative to the input provider's PresentationSource. These are often the same, but not when the tooltip's owner comes from a Popup (or similar context that captures mouse input away from the normal input provider). This dismisses the tooltip immediately - the logic thinks the mouse has left the safe area.

Fixed by converting the mouse position to the correct coordinate system - relative to the tooltip owner's PresentationSource.

Customer Impact

Fixes a regression.

Regression

Yes.

Testing

Risk

Low. Applies the correct coordinate transformation before checking the mouse position.

@SamBent SamBent requested a review from a team as a code owner January 10, 2022 23:39
@ghost ghost added the PR metadata: Label to tag PRs, to facilitate with triage label Jan 10, 2022
@ghost ghost requested review from fabiant3 and ryalanms January 10, 2022 23:39
@singhashish-wpf singhashish-wpf merged commit 640a692 into dotnet:main Feb 1, 2022
singhashish-wpf added a commit that referenced this pull request Feb 7, 2022
dipeshmsft pushed a commit that referenced this pull request Feb 7, 2022
…6063)

* ToolTips in popups (or any context where capture is active) (#5931)

* make SafeArea check work when capture is active

* Update and sync changes with main and #5932

Co-authored-by: Ashish Kumar Singh <SINGHASHISH@MICROSOFT.COM>

* Fix merge errors for #5931 and #5932 (#6078)

* update to make same changes as 5931

Co-authored-by: Sam Bent <sambent@microsoft.com>
@ghost ghost locked as resolved and limited conversation to collaborators Apr 6, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

PR metadata: Label to tag PRs, to facilitate with triage

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Comboboxitem tooltip bug

3 participants