mirror of
https://github.com/X11Libre/xf86-input-evdev.git
synced 2026-03-24 01:34:04 +00:00
Skip check for EVDEV_RELATIVE_EVENTS for wheel events.
This patch fixes a regression introduced with 1f641d75e.
Wheel axis events are posted as button clicks, a device may have no relative
axes but it does need to post these button clicks.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
This commit is contained in:
16
src/evdev.c
16
src/evdev.c
@@ -524,14 +524,6 @@ EvdevProcessRelativeMotionEvent(InputInfoPtr pInfo, struct input_event *ev)
|
||||
/* Get the signed value, earlier kernels had this as unsigned */
|
||||
value = ev->value;
|
||||
|
||||
/* Ignore EV_REL events if we never set up for them. */
|
||||
if (!(pEvdev->flags & EVDEV_RELATIVE_EVENTS))
|
||||
return;
|
||||
|
||||
/* Handle mouse wheel emulation */
|
||||
if (EvdevWheelEmuFilterMotion(pInfo, ev))
|
||||
return;
|
||||
|
||||
pEvdev->rel = 1;
|
||||
|
||||
switch (ev->code) {
|
||||
@@ -552,6 +544,14 @@ EvdevProcessRelativeMotionEvent(InputInfoPtr pInfo, struct input_event *ev)
|
||||
|
||||
/* We don't post wheel events as axis motion. */
|
||||
default:
|
||||
/* Ignore EV_REL events if we never set up for them. */
|
||||
if (!(pEvdev->flags & EVDEV_RELATIVE_EVENTS))
|
||||
return;
|
||||
|
||||
/* Handle mouse wheel emulation */
|
||||
if (EvdevWheelEmuFilterMotion(pInfo, ev))
|
||||
return;
|
||||
|
||||
pEvdev->delta[ev->code] += value;
|
||||
break;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user