GNOME Bugzilla – Bug 729601
wayland: Scale smooth scroll events to pointer motion coordinate space
Last modified: 2014-05-31 14:07:24 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.
Created attachment 275921 [details] [review] wayland: Scale smooth scroll events to pointer motion coordinate space
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.
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.
Attachment 275921 [details] pushed as 048f035 - wayland: Scale smooth scroll events to pointer motion coordinate space