On Fri Jul 10 09:30:19 2026 +0000, Rémi Bernon wrote:
I think you can have either and both actual mouse motion and artificial motion from the warp request that have happened and been processed between the SetCursorPos and ClipCursor calls. You can't really tell whether the position returned by `NtUserGetCursorPos` is stale or fresh at this point? If you want to ignore warp induced mouse motion it needs to be done by synchronizing between whichever call may warp the pointer, and the motion event reception. I don't know how this can be done in Wayland, but in X11 we keep the serial of the warping requests and ignore any future event that has happened before the X server processed that request. On the Wayland driver ClipCursor also does the warp so how could the warp request occur between SetCursorPos and ClipCursor? But yes we cannot tell if the returned position of NtUserGetCursorPos is the current position of the pointer or the position that we were supposed to warp to.
As for your second point, it would be nice to be able to do that but I think it might only possible with wayland 1.26 which hasn't released yet -- https://gitlab.winehq.org/wine/wine/-/merge_requests/11356#note_145413