libinput: normalize WL_CALIBRATION before passing it to libinput
authorPeter Hutterer <peter.hutterer@who-t.net>
Tue, 9 Sep 2014 03:02:25 +0000 (13:02 +1000)
committerPekka Paalanen <pekka.paalanen@collabora.co.uk>
Fri, 12 Sep 2014 06:51:04 +0000 (09:51 +0300)
commit3fbba493d5732f9feb5a7956cb98d6eb5f0ff363
tree1bf5d36aaa8a949c8fbcb9a9151bcc4b918ae6ca
parent03db71caea98f8a2c5d302763289495ea2b30596
libinput: normalize WL_CALIBRATION before passing it to libinput

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
Reviewed-by: Jonas Ã…dahl <jadahl@gmail.com>
Acked-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
configure.ac
src/libinput-device.c