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 723560 - wayland: Generate better smooth scroll deltas
wayland: Generate better smooth scroll deltas
Status: RESOLVED FIXED
Product: clutter
Classification: Platform
Component: wayland
unspecified
Other All
: Normal normal
: ---
Assigned To: clutter-maint
clutter-maint
Depends on:
Blocks:
 
 
Reported: 2014-02-03 21:55 UTC by Jonas Ådahl
Modified: 2014-05-28 22:12 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
wayland: Generate better smooth scroll deltas (1.84 KB, patch)
2014-02-03 21:55 UTC, Jonas Ådahl
accepted-commit_now Details | Review
wayland: Generate better smooth scroll deltas (1.86 KB, patch)
2014-02-11 21:28 UTC, Jonas Ådahl
rejected Details | Review
wayland: Fix coding style issues (4.04 KB, patch)
2014-02-11 21:30 UTC, Jonas Ådahl
committed Details | Review
Fix scaling of pointer axis vectors (3.01 KB, patch)
2014-05-05 21:47 UTC, Jonas Ådahl
committed Details | Review

Description Jonas Ådahl 2014-02-03 21:55:21 UTC
Delta's are assumed to be in the same dimension as GDK smooth scroll
deltas.

Signed-off-by: Jonas Ådahl <jadahl@gmail.com>
Comment 1 Jonas Ådahl 2014-02-03 21:55:33 UTC
Created attachment 268005 [details] [review]
wayland: Generate better smooth scroll deltas
Comment 2 Emmanuele Bassi (:ebassi) 2014-02-10 18:19:19 UTC
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 '-'.
Comment 3 Jonas Ådahl 2014-02-11 21:28:15 UTC
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>
Comment 4 Jonas Ådahl 2014-02-11 21:30:07 UTC
Created attachment 268850 [details] [review]
wayland: Fix coding style issues

Signed-off-by: Jonas Ådahl <jadahl@gmail.com>
Comment 5 Jonas Ådahl 2014-05-05 21:47:10 UTC
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.
Comment 6 Jonas Ådahl 2014-05-05 21:48:09 UTC
Review of attachment 268848 [details] [review]:

Marking old patch as rejected.
Comment 7 Emmanuele Bassi (:ebassi) 2014-05-27 11:11:22 UTC
Review of attachment 268850 [details] [review]:

looks good.
Comment 8 Emmanuele Bassi (:ebassi) 2014-05-27 11:12:15 UTC
Review of attachment 275920 [details] [review]:

looks good.
Comment 9 Emmanuele Bassi (:ebassi) 2014-05-28 22:11:52 UTC
pushed to clutter-1.20 branch, and released as part of 1.19.2.