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
ToolTips in popups (or any context where capture is active) (#5931) #6063
Conversation
* 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>
I'm really sorry to probably just waste your time as I'm very new to this repo, but I would appreciate you going a bit into detail on how introducing this new method, which seems to not be used anywhere else, would fix the tooltip issue? Again, don't want to waste your time, so any pointer would suffice. I've searched the repo for occurrences of the |
This comes from a bad merge. The original commit in PR #5931 changed @singhashish-wpf , please restore the original commit. (In main, and in all servicing branches.) |
Yeah, I guess this was actually conflicting with this commit |
Tooltips are still broken in 6.0.3 - in some ways worse than before, is it possible the merge resolution was unsuccessful? Now tooltips seem to disappear everywhere. Run the popup-repro @ https://github.com/amirburbea/PopupRepro Change the app between .NET5 & .NET6, check out tooltips in a ListBox (left) and in a ComboBox (right). It seems broken in both, whereas before it was only broken in the ComboBox. |
Confirmed! ALL Tooltips in C#, WPF project developed in VS 2022 Community .Net 6.0.2, vanish immediately after appearing. This happens with all controls (buttons, text boxes ...) with a tooltip. This problem appeared after the most recent VS2022 update to .Net 6.0.3. among other things. It wasn't there with previous .Net 6 versions at least as far as buttons and textboxes were concerned. Notice: the issue only occurs when I set the display scale to 125% or more, not with 100%. |
Can confirm borked tooltips (6.0.2). It's a serious detriment to my application on my laptop, which uses tooltips a ton, and has a high dpi screen (which >100% scaling). I updated to 6.0.3 and now pretty much no tooltips work at all. |
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.