summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPeter Hutterer <peter.hutterer@who-t.net>2014-12-05 13:41:04 +1000
committerPeter Hutterer <peter.hutterer@who-t.net>2014-12-05 14:04:18 +1000
commitf9336361430f176e1d090decd19f5af3650f1814 (patch)
treef8245fd09fb148e8d004ac23e1d448185f2cef9c
parent1affca8d44541141dc981e5a51766b98f4a8e259 (diff)
udev: only apply default calibration on absolute devices
Fixes a crash if the LIBINPUT_CALIBRATION_MATRIX is set for a relative device. https://bugs.freedesktop.org/show_bug.cgi?id=86993 Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Jonas Ã…dahl <jadahl@gmail.com>
-rw-r--r--src/udev-seat.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/udev-seat.c b/src/udev-seat.c
index f7a3df34..3d057336 100644
--- a/src/udev-seat.c
+++ b/src/udev-seat.c
@@ -93,7 +93,8 @@ device_added(struct udev_device *udev_device,
udev_device_get_property_value(udev_device,
"LIBINPUT_CALIBRATION_MATRIX");
- if (calibration_values && sscanf(calibration_values,
+ if (device->abs.absinfo_x && device->abs.absinfo_y &&
+ calibration_values && sscanf(calibration_values,
"%f %f %f %f %f %f",
&calibration[0],
&calibration[1],