X11: EventMouseScroll and EventMouseButton report incorrect cursor position
navaratine opened this issue · 1 comments
navaratine commented
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.
.
navaratine commented
I've opened a PR with the proposed fix. Feel free to merge it if it looks alright to You.