From f28507e8ce2bd45b51c28f024baebd9711c28fc3 Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Fri, 27 Apr 2012 15:42:17 +1000 Subject: 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 Reviewed-by: Chase Douglas --- src/evdev.c | 3 +++ 1 file changed, 3 insertions(+) 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; } -- cgit v1.2.3