diff options
-rw-r--r-- | src/evdev-fallback.c | 20 |
1 files changed, 13 insertions, 7 deletions
diff --git a/src/evdev-fallback.c b/src/evdev-fallback.c index 5dc1ce48..bd5a458c 100644 --- a/src/evdev-fallback.c +++ b/src/evdev-fallback.c @@ -101,7 +101,7 @@ fallback_normalize_delta(struct evdev_device *device, static inline bool post_button_scroll(struct evdev_device *device, - struct normalized_coords unaccel, + struct device_float_coords raw, uint64_t time) { if (device->scroll.method != LIBINPUT_CONFIG_SCROLL_ON_BUTTON_DOWN) @@ -120,9 +120,16 @@ post_button_scroll(struct evdev_device *device, device->scroll.button_scroll_state = BUTTONSCROLL_SCROLLING; _fallthrough_; case BUTTONSCROLL_SCROLLING: + { + const struct normalized_coords normalized = + filter_dispatch_constant(device->pointer.filter, + &raw, + device, + time); evdev_post_scroll(device, time, LIBINPUT_POINTER_AXIS_SOURCE_CONTINUOUS, - &unaccel); + &normalized); + } return true; } @@ -175,7 +182,7 @@ fallback_flush_relative_motion(struct fallback_dispatch *dispatch, uint64_t time) { struct libinput_device *base = &device->base; - struct normalized_coords accel, unaccel; + struct normalized_coords accel; struct device_float_coords raw; if (!(device->seat_caps & EVDEV_DEVICE_POINTER)) @@ -183,14 +190,13 @@ fallback_flush_relative_motion(struct fallback_dispatch *dispatch, fallback_rotate_relative(dispatch, device); - fallback_normalize_delta(device, &dispatch->rel, &unaccel); raw.x = dispatch->rel.x; raw.y = dispatch->rel.y; dispatch->rel.x = 0; dispatch->rel.y = 0; /* Use unaccelerated deltas for pointing stick scroll */ - if (post_button_scroll(device, unaccel, time)) + if (post_button_scroll(device, raw, time)) return; if (device->pointer.filter) { @@ -202,10 +208,10 @@ fallback_flush_relative_motion(struct fallback_dispatch *dispatch, } else { evdev_log_bug_libinput(device, "accel filter missing\n"); - accel = unaccel; + accel.x = accel.y = 0; } - if (normalized_is_zero(accel) && normalized_is_zero(unaccel)) + if (normalized_is_zero(accel)) return; pointer_notify_motion(base, time, &accel, &raw); |