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 729601 - wayland: Scale smooth scroll events to pointer motion coordinate space
wayland: Scale smooth scroll events to pointer motion coordinate space
Status: RESOLVED FIXED
Product: mutter
Classification: Core
Component: wayland
unspecified
Other All
: Normal normal
: ---
Assigned To: mutter-maint
mutter-maint
Depends on:
Blocks:
 
 
Reported: 2014-05-05 21:48 UTC by Jonas Ådahl
Modified: 2014-05-31 14:07 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
wayland: Scale smooth scroll events to pointer motion coordinate space (1.54 KB, patch)
2014-05-05 21:48 UTC, Jonas Ådahl
committed Details | Review

Description Jonas Ådahl 2014-05-05 21:48:57 UTC
Smooth scroll event vectors from clutter have the same dimensions as the
ones from from Xi2, i.e. where 1.0 is 1 discrete scroll step. To scale
these to the coordinate space used by wl_pointer.axis
vertical/horizontal scroll events, multiply the vector by 10.
Comment 1 Jonas Ådahl 2014-05-05 21:48:59 UTC
Created attachment 275921 [details] [review]
wayland: Scale smooth scroll events to pointer motion coordinate space
Comment 2 Jasper St. Pierre (not reading bugmail) 2014-05-05 22:31:18 UTC
Review of attachment 275921 [details] [review]:

We seem to have this "10" factor hardcoded around in a lot of places, including Weston, Wayland, GTK+, etc. Is there a rationale anywhere for this constant? Should it be in the Wayland protocol much like the evdev keycode offset?

Code looks good.
Comment 3 Jonas Ådahl 2014-05-07 20:00:39 UTC
Yea, it might be a good idea. It'd probably be a good idea to also document what it would mean in arc degrees as that is a concept used as well AFAIK.

Note that this patch only works reasonably well with new patch attached to https://bugzilla.gnome.org/show_bug.cgi?id=723560 applied.
Comment 4 Jonas Ådahl 2014-05-31 14:07:20 UTC
Attachment 275921 [details] pushed as 048f035 - wayland: Scale smooth scroll events to pointer motion coordinate space