ToolTips in popups (or any context where capture is active)#5931
Merged
singhashish-wpf merged 3 commits intodotnet:mainfrom Feb 1, 2022
Merged
ToolTips in popups (or any context where capture is active)#5931singhashish-wpf merged 3 commits intodotnet:mainfrom
singhashish-wpf merged 3 commits intodotnet:mainfrom
Conversation
lindexi
reviewed
Jan 11, 2022
...icrosoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/PopupControlService.cs
Show resolved
Hide resolved
singhashish-wpf
approved these changes
Jan 19, 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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.