libinput: normalize WL_CALIBRATION before passing it to libinput

Graphics / Wayland / Weston - Peter Hutterer [who-t.net] - 12 September 2014 01:51 UTC

WL_CALIBRATION, introduced in weston-1.1, requires the translation component of the calibration matrix to be in screen coordinates. libinput does not have access to this and it's not a very generic way to do this anyway. So with the libinput backend, WL_CALIBRATION support is currently broken (#82742). This cannot be fixed in libinput without changing its API for this specific use-case.

This patch lets weston take care of WL_CALIBRATION. It takes the original format and normalizes it before passing it to libinput. This way libinput still does the coordinate transformation, weston just needs to provide the initial configuration.

Note that this needs an updated libinput, otherwise libinput will try to transform coordinates as well.

Bug: https://bugs.freedesktop.org/show_bug.cgi?id=82742

3fbba49 libinput: normalize WL_CALIBRATION before passing it to libinput
configure.ac | 2 +-
src/libinput-device.c | 87 +++++++++++++++++++++++++++++++++++++++++++++++++
2 files changed, 88 insertions(+), 1 deletion(-)

Upstream: cgit.freedesktop.org


  • Share