mirror of
https://gitlab.freedesktop.org/libinput/libinput.git
synced 2025-12-24 08:50:20 +01:00
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 <peter.hutterer@who-t.net>
This commit is contained in:
parent
f5bc28b31a
commit
09a3770961
1 changed files with 5 additions and 14 deletions
19
src/evdev.c
19
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);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue