[PATCH weston 03/25] libinput: deprecate WL_CALIBRATION
Pekka Paalanen
ppaalanen at gmail.com
Fri Mar 23 12:00:43 UTC 2018
From: Pekka Paalanen <pekka.paalanen at collabora.co.uk>
The udev property WL_CALIBRATION is an old way of giving Weston a
touchscreen calibration matrix. It is Weston-specific.
The recommended way of setting up a calibration is to use the udev
property LIBINPUT_CALIBRATION_MATRIX, which libinput will load
automatically and therefore applies to all libinput using display
servers and applications.
The syntax of WL_CALIBRATION and LIBINPUT_CALIBRATION_MATRIX is
different as well: WL_CALIBRATION uses pixels as the translation part
units, which makes the values depend on the output resolution.
LIBINPUT_CALIBRATION_MATRIX on the other hand uses normalized units.
Signed-off-by: Pekka Paalanen <pekka.paalanen at collabora.co.uk>
---
libweston/libinput-device.c | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/libweston/libinput-device.c b/libweston/libinput-device.c
index 48bfd6f1..64d99f75 100644
--- a/libweston/libinput-device.c
+++ b/libweston/libinput-device.c
@@ -500,6 +500,13 @@ evdev_device_set_calibration(struct evdev_device *device)
udev_device_get_property_value(udev_device,
"WL_CALIBRATION");
+ if (calibration_values) {
+ weston_log("Warning: input device %s has WL_CALIBRATION property set. "
+ "Support for it will be removed in the future. "
+ "Please use LIBINPUT_CALIBRATION_MATRIX instead.\n",
+ sysname);
+ }
+
if (!calibration_values || sscanf(calibration_values,
"%f %f %f %f %f %f",
&calibration[0],
--
2.16.1
More information about the wayland-devel
mailing list