Avalonia
Avalonia copied to clipboard
Pointer Position Jumps to 0,0 on Fast Movement
Describe the bug
This was first noticed with the ColorPicker but I expect is applies to every control.. Pressing and holding on the spectrum then dragging outside the window bounds will cause the pointer position to report 0,0 (relative) before it is usually fixed. This shouldn't happen and causes jumps in the selected color.
To Reproduce Steps to reproduce the behavior:
- Go to the ColorPicker page of the ControlCatalog
- On the far-right color spectrum Press/Hold/Drag to change color
- While continuing to hold the left mouse button, drag the pointer outside the app window
- Notice that the reported pointer position to the control is sometimes (0,0) instead of the last position before the pointer exited the app.
Expected behavior
Pointer position should never be reported as 0,0. Instead, either the last pointer position should be used -- or more accurately -- the pointer position clipped to the bounds of the focused control.
Screenshots
https://user-images.githubusercontent.com/17993847/185774278-b5d84be0-772a-4aba-a919-216167c8e82c.mp4
Desktop (please complete the following information):
- OS: Windows 10 Pro
- Version [e.g. 0.10.0-rc1 or 0.9.12]
Additional context Add any other context about the problem here.
This actually occurs for fast movement in general. If the mouse is moved quickly over the control it will happen even if the pointer doesn't leave the app window.
I do not think this is an issue with the ColorPicker and think it was working before some of the later PRs for composition or pointer events.
@robloo do you think this issue is related to this behavior?
When resizing a column in the TreeDataGrid
, or dragging the ScrollBar
I get some flicker in some controls and sometimes in the mouse pointer.
It seems that the Control
is getting called to PointerExited
and PointerEntered
very fast.
@danipen Please, file a separate issue since it seems to be a different bug
@danipen It looks like your issue may be related to #8795. I also noticed some fast blinking in some mouse over situations. You might just want to move your comment there.
Not a regression, as this bug existed before 11.0. Unlikely other pointer blinking related issues.