summaryrefslogtreecommitdiff
path: root/src/evdev.c
diff options
context:
space:
mode:
authorPeter Hutterer <peter.hutterer@who-t.net>2012-04-27 15:42:17 +1000
committerPeter Hutterer <peter.hutterer@who-t.net>2012-05-01 11:25:00 +1000
commitf28507e8ce2bd45b51c28f024baebd9711c28fc3 (patch)
tree8f0ab41d51cb1e47542ded62a3b8efd6628e50be /src/evdev.c
parent99340147b9092a5aaec997eca407282a51e1f063 (diff)
Devices configured as mice need REL_X/Y
Some keyboards export scroll axes and any absolute axis possible in 11 dimensions. All these axes are mute, except possibly for the scroll wheels. So if a device has a scroll axis, and we're configuring it as mouse, force the x/y axes into existence. This stops the logspam complaining about not enough axes on pointer movement after a xrandr change. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Chase Douglas <chase.douglas@canonical.com>
Diffstat (limited to 'src/evdev.c')
-rw-r--r--src/evdev.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/evdev.c b/src/evdev.c
index 8cf630c..140a633 100644
--- a/src/evdev.c
+++ b/src/evdev.c
@@ -2271,6 +2271,9 @@ EvdevProbe(InputInfoPtr pInfo)
xf86IDrvMsg(pInfo, X_INFO, "Configuring as touchscreen\n");
pInfo->type_name = XI_TOUCHSCREEN;
} else {
+ if (!EvdevBitIsSet(pEvdev->rel_bitmask, REL_X) ||
+ !EvdevBitIsSet(pEvdev->rel_bitmask, REL_Y))
+ EvdevForceXY(pInfo, Relative);
xf86IDrvMsg(pInfo, X_INFO, "Configuring as mouse\n");
pInfo->type_name = XI_MOUSE;
}