summaryrefslogtreecommitdiff
path: root/src/evdev.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/evdev.c')
-rw-r--r--src/evdev.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/evdev.c b/src/evdev.c
index bbabb56..5bc562a 100644
--- a/src/evdev.c
+++ b/src/evdev.c
@@ -217,11 +217,16 @@ EvdevReadInput(InputInfoPtr pInfo)
break;
}
+
/* Get the signed value, earlier kernels had this as unsigned */
value = ev.value;
switch (ev.type) {
case EV_REL:
+ /* Handle mouse wheel emulation */
+ if (EvdevWheelEmuFilterMotion(pInfo, &ev))
+ break;
+
switch (ev.code) {
case REL_X:
dx += value;
@@ -286,6 +291,9 @@ EvdevReadInput(InputInfoPtr pInfo)
if (EvdevMBEmuFilterEvent(pInfo, button, value))
break;
+ if (EvdevWheelEmuFilterButton(pInfo, button, value))
+ break;
+
if (button)
xf86PostButtonEvent(pInfo->dev, 0, button, value, 0, 0);
else
@@ -943,7 +951,10 @@ EvdevProc(DeviceIntPtr device, int what)
{
xf86AddEnabledDevice(pInfo);
if (pEvdev->flags & EVDEV_BUTTON_EVENTS)
+ {
EvdevMBEmuPreInit(pInfo);
+ EvdevWheelEmuPreInit(pInfo);
+ }
device->public.on = TRUE;
}
break;