[PATCH evdev] Devices configured as mice need REL_X/Y
Peter Hutterer
peter.hutterer at who-t.net
Thu Apr 26 23:05:29 PDT 2012
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 at who-t.net>
---
This may also be the fix for 47281 though it's likely more of a workaround
than a fix.
src/evdev.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/src/evdev.c b/src/evdev.c
index ff43dcf..923d9cd 100644
--- a/src/evdev.c
+++ b/src/evdev.c
@@ -2364,6 +2364,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;
}
--
1.7.10
More information about the xorg-devel
mailing list