GNOME Bugzilla – Bug 723560
wayland: Generate better smooth scroll deltas
Last modified: 2014-05-28 22:12:18 UTC
Delta's are assumed to be in the same dimension as GDK smooth scroll deltas. Signed-off-by: Jonas Ådahl <jadahl@gmail.com>
Created attachment 268005 [details] [review] wayland: Generate better smooth scroll deltas
Review of attachment 268005 [details] [review]: thanks for the patch. the original code is a bit iffy, style-wise, so I'd appreciate if you could fix it while your doing this work. if you could fix this patch before pushing it, it would be stellar. ::: clutter/wayland/clutter-input-device-wayland.c @@ +186,3 @@ if (axis == WL_POINTER_AXIS_HORIZONTAL_SCROLL) { + delta_x = -wl_fixed_to_double(value) / delta_factor; coding style: missing space between function name and arguments list. also, the leading '-' is easy to miss; I do prefer using an explicit "* -1.0" @@ +192,3 @@ { delta_x = 0; + delta_y = -wl_fixed_to_double(value) / delta_factor; coding style: missing space between function name and arguments list. same as above, re: the leading '-'.
Created attachment 268848 [details] [review] wayland: Generate better smooth scroll deltas Delta's are assumed to be in the same dimension as GDK smooth scroll deltas. Signed-off-by: Jonas Ådahl <jadahl@gmail.com>
Created attachment 268850 [details] [review] wayland: Fix coding style issues Signed-off-by: Jonas Ådahl <jadahl@gmail.com>
Created attachment 275920 [details] [review] Fix scaling of pointer axis vectors The vector of libinput and Wayland pointer axis events are in pointer motion coordinate space. To convert to clutter's internal representation the vectors need to be scaled to Xi2 scroll steps.
Review of attachment 268848 [details] [review]: Marking old patch as rejected.
Review of attachment 268850 [details] [review]: looks good.
Review of attachment 275920 [details] [review]: looks good.
pushed to clutter-1.20 branch, and released as part of 1.19.2.