summaryrefslogtreecommitdiff
path: root/src/evdev.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/evdev.c')
-rw-r--r--src/evdev.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/src/evdev.c b/src/evdev.c
index bdf7f0a..e1e1eae 100644
--- a/src/evdev.c
+++ b/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;
}