moonlight-stream / moonlight-embedded

Gamestream client for embedded systems
https://github.com/moonlight-stream/moonlight-embedded/wiki
GNU General Public License v3.0
1.51k stars 326 forks source link

[X11] fix cursor jumping when grabbed #834

Open djdisodo opened 2 years ago

djdisodo commented 2 years ago

Description i found that cursor jumps randomly when you move your cursor only when you grabbed

it occurs because you set last_x and last_y while another MotionNotify event is in the queue, possibly an event before XWarpPointer applied

this patch make sure there is no MotionNotify event in the queue before setting last_x and last_y, warping cursor and sending mouse move