These events report incorrect, rarely updated _x and _y values.
I've been able to track down the source of this issue: unlike MotionNotify handler of XI_Motion doesnt update lastMousePosX and lastMousePosY before dispatching EventMouseMove. Handler of MotionNotify does set these values but I find that it's very rarely invoked. This results in scroll and click events often reporting incorrect mouse position.
This can be fixed by replicating behaviour of MotionNotify handler and updating last mouse position before event dispatch.
.
These events report incorrect, rarely updated![events](https://user-images.githubusercontent.com/29862727/190850889-490678f8-9621-41ab-a65b-3c71b2808d78.png)
_x
and_y
values.I've been able to track down the source of this issue: unlike
MotionNotify
handler ofXI_Motion
doesnt updatelastMousePosX
andlastMousePosY
before dispatchingEventMouseMove
. Handler ofMotionNotify
does set these values but I find that it's very rarely invoked. This results in scroll and click events often reporting incorrect mouse position.This can be fixed by replicating behaviour of
.
![events after fix](https://user-images.githubusercontent.com/29862727/190850945-013f8acf-40b0-4efe-ab3d-eb56b8e8fd9d.png)
MotionNotify
handler and updating last mouse position before event dispatch.