mirror of
https://gitlab.freedesktop.org/libinput/libinput.git
synced 2026-01-11 06:20:22 +01:00
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>
This commit is contained in:
parent
1affca8d44
commit
f933636143
1 changed files with 2 additions and 1 deletions
|
|
@ -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],
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue