[PATCH libinput] udev: only apply default calibration on absolute devices

Jonas Ådahl jadahl at gmail.com
Thu Dec 4 20:02:42 PST 2014


On Fri, Dec 05, 2014 at 01:46:07PM +1000, Peter Hutterer wrote:
> 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 at who-t.net>

Reviewed-by: Jonas Ådahl <jadahl at gmail.com>

> ---
>  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 f7a3df3..3d05733 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],
> -- 
> 2.1.0
> 
> _______________________________________________
> wayland-devel mailing list
> wayland-devel at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/wayland-devel


More information about the wayland-devel mailing list