From f9336361430f176e1d090decd19f5af3650f1814 Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Fri, 5 Dec 2014 13:41:04 +1000 Subject: udev: only apply default calibration on absolute devices MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 Reviewed-by: Jonas Ã…dahl --- src/udev-seat.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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], -- cgit v1.2.1