After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 736413 - USB mouse doesn't register slow movements to the right or down in Gnome on Wayland
USB mouse doesn't register slow movements to the right or down in Gnome on Wa...
Status: RESOLVED FIXED
Product: clutter
Classification: Platform
Component: wayland
1.19.x
Other Linux
: Normal normal
: ---
Assigned To: clutter-maint
clutter-maint
: 736827 (view as bug list)
Depends on:
Blocks:
 
 
Reported: 2014-09-10 12:20 UTC by t.jp
Modified: 2014-09-17 22:48 UTC
See Also:
GNOME target: ---
GNOME version: 3.13/3.14


Attachments
ClutterInputDevice: Store the cursor coordinate state as floating point (3.16 KB, patch)
2014-09-14 14:58 UTC, Jonas Ådahl
committed Details | Review

Description t.jp 2014-09-10 12:20:38 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
Comment 1 Jonas Ådahl 2014-09-14 14:58:30 UTC
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.
Comment 2 Jonas Ådahl 2014-09-14 15:03:04 UTC
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.
Comment 3 t.jp 2014-09-14 16:33:59 UTC
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!
Comment 4 Emmanuele Bassi (:ebassi) 2014-09-14 17:06:47 UTC
Review of attachment 286167 [details] [review]:

sounds reasonable to me.
Comment 5 Jonas Ådahl 2014-09-14 17:53:04 UTC
Review of attachment 286167 [details] [review]:

Thanks. Pushed.
Comment 6 Jonas Ådahl 2014-09-14 17:54:27 UTC
Hmm, doesn't seem like I can close the bug. git-bz couldn't either and complained that I didn't have permission.
Comment 7 Emmanuele Bassi (:ebassi) 2014-09-17 20:35:50 UTC
*** Bug 736827 has been marked as a duplicate of this bug. ***
Comment 8 t.jp 2014-09-17 22:48:05 UTC
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.