From: Peter Hutterer Date: Fri, 5 Dec 2014 03:41:04 +0000 (+1000) Subject: udev: only apply default calibration on absolute devices X-Git-Tag: 0.7.0~1 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=f9336361430f176e1d090decd19f5af3650f1814;p=platform%2Fupstream%2Flibinput.git 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 Reviewed-by: Jonas Ã…dahl --- 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],