GNOME Bugzilla – Bug 736413
USB mouse doesn't register slow movements to the right or down in Gnome on Wayland
Last modified: 2014-09-17 22:48:05 UTC
I'm running Gnome 3.14 Beta 2 on Arch Linux on Wayland. When I move my mouse fast the cursor responds to the movement just like on X11. When I move my mouse very slowly to the right the cursor doesn't move at all. The same goes for when I'm pulling the mouse towards me. The speed threshold to registering movements seems a lot higher than when I move the mouse to the left or up. I have previously reported this to libinput, but Jonas Ådahl mentioned that it's a bug in clutter. https://bugs.freedesktop.org/show_bug.cgi?id=83674
Created attachment 286167 [details] [review] ClutterInputDevice: Store the cursor coordinate state as floating point To support sub-pixel motion events coming from relative events, the fraction part needs to be stored in the input device state as well. To do this, simply change the current type from gint to gfloat.
Seems I cannot change the status, priority, severity or who is assigned, but the issue is with clutter and the above patch fixes it. If there is some reason for keep storing the cursor state as integers then the alternative solution to this bug is to shave off the sub-pixel fraction when reading it from libinput and then append to the next event.
I applied this patch to my clutter package on Arch and the input on Gnome on Wayland is 1000x better. Cursor feels precise and responsive. Now I can finally use my Gnome on Wayland session as the daily driver. Thanks Jonas!
Review of attachment 286167 [details] [review]: sounds reasonable to me.
Review of attachment 286167 [details] [review]: Thanks. Pushed.
Hmm, doesn't seem like I can close the bug. git-bz couldn't either and complained that I didn't have permission.
*** Bug 736827 has been marked as a duplicate of this bug. ***
I just looked at the patch in more detail. So in clutter/clutter-device-manager-private.h gint current_x; gint current_y; is changed to type gfloat, but in the same struct gint previous_x; gint previous_y; is still of type gint. Wouldn't it make sense to change them to gfloat aswell? I have no knowledge of the clutter codebase, but my naive thinking would be that if it represents the same thing just in the past it should be of the same type. Maybe this was overlooked.