From 09a3770961aad0973943bf23ae3f7a078ba90f95 Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Tue, 21 Jan 2014 15:48:06 +1000 Subject: [PATCH] evdev: don't ignore scroll events with a value greater than 1/-1 Higher values than 1 or -1 are legitimate on some devices, though not all mice send wheel events other than 1/-1. Signed-off-by: Peter Hutterer --- src/evdev.c | 19 +++++-------------- 1 file changed, 5 insertions(+), 14 deletions(-) diff --git a/src/evdev.c b/src/evdev.c index 012c887a..43f0c1b8 100644 --- a/src/evdev.c +++ b/src/evdev.c @@ -321,20 +321,11 @@ evdev_process_relative(struct evdev_device *device, break; case REL_WHEEL: evdev_flush_pending_event(device, time); - switch (e->value) { - case -1: - /* Scroll down */ - case 1: - /* Scroll up */ - pointer_notify_axis( - base, - time, - LIBINPUT_POINTER_AXIS_VERTICAL_SCROLL, - -1 * e->value * DEFAULT_AXIS_STEP_DISTANCE); - break; - default: - break; - } + pointer_notify_axis( + base, + time, + LIBINPUT_POINTER_AXIS_VERTICAL_SCROLL, + -1 * e->value * DEFAULT_AXIS_STEP_DISTANCE); break; case REL_HWHEEL: evdev_flush_pending_event(device, time);