[PATCH] evdev: Only init the calibration property for absolute devices.

Peter Hutterer peter.hutterer at who-t.net
Mon Nov 30 22:38:02 PST 2009


Relative devices can't be calibrated anyway so why bother.

Signed-off-by: Peter Hutterer <peter.hutterer at who-t.net>
---
This seems to be a valuable addition on top. Specifically, this makes it
easier on session tools to choose which devices to offer calibration tools
for.

 src/evdev.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/src/evdev.c b/src/evdev.c
index afa9bc5..85503bf 100644
--- a/src/evdev.c
+++ b/src/evdev.c
@@ -2424,7 +2424,7 @@ EvdevInitProperty(DeviceIntPtr dev)
             rc = XIChangeDeviceProperty(dev, prop_calibration, XA_INTEGER,
                     32, PropModeReplace, 4, calibration,
                     FALSE);
-        } else {
+        } else if (pEvdev->flags & EVDEV_ABSOLUTE_EVENTS) {
             rc = XIChangeDeviceProperty(dev, prop_calibration, XA_INTEGER,
                     32, PropModeReplace, 0, NULL,
                     FALSE);
-- 
1.6.5.2



More information about the xorg mailing list