From 72aee3d303595ce20c3393e1ef1cbe9cfdfc6669 Mon Sep 17 00:00:00 2001 From: Chow Loong Jin Date: Fri, 11 May 2018 23:28:59 +0800 Subject: [PATCH 2/2] Use accelerated coordinates for trackpoint scrolling With trackpoint button scrolling, one typically expects the document to move at the same speed that the pointer would move if not scrolling. This commit turns on acceleration for trackpoint button scrolling so that we can see that behaviour. Signed-off-by: Chow Loong Jin --- src/evdev-fallback.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/src/evdev-fallback.c b/src/evdev-fallback.c index fa01faa4..13bc4b02 100644 --- a/src/evdev-fallback.c +++ b/src/evdev-fallback.c @@ -177,10 +177,6 @@ fallback_flush_relative_motion(struct fallback_dispatch *dispatch, dispatch->rel.x = 0; dispatch->rel.y = 0; - /* Use unaccelerated deltas for pointing stick scroll */ - if (post_trackpoint_scroll(device, unaccel, time)) - return; - if (device->pointer.filter) { /* Apply pointer acceleration. */ accel = filter_dispatch(device->pointer.filter, @@ -193,6 +189,9 @@ fallback_flush_relative_motion(struct fallback_dispatch *dispatch, accel = unaccel; } + if (post_trackpoint_scroll(device, accel, time)) + return; + if (normalized_is_zero(accel) && normalized_is_zero(unaccel)) return; -- 2.17.0