show immediately when replacing current tooltip #6058
Merged
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 #5703
Description
Moving the mouse from a control A that is showing a tooltip, to another control B that has a tooltip, should show B's tooltip immediately (ignoring its InitialShowDelay). This works correctly if A's tooltip is closed before checking whether B has a tooltip, which was always the case prior to .NET 6.0. The new tooltip behavior in 6.0 can keep A's tooltip open longer, and now needs to check whether a tooltip is already open when it decides that B wants to open its tooltip.
There's an ambiguous case when moving the mouse toward A's tooltip and passing over B. If the user intends to move to A's tooltip (e.g. to read the tooltip with Magnifier), the tooltip should stay open; but if the user intends to move to B, the tooltip should close and be immediately replaced by B's tooltip. We can't know the user's intent. Instead we delay replacing the tooltip long enough to detect steady motion toward A's tooltip, but short enough to open B's tooltip "immediately" if the user stops moving the mouse.
Customer Impact
Fixes a regression.
Regression
Yes
Testing
Risk
Low. Handles a case that couldn't happen in .NET 5.