[PATCH libinput 00/11] Fix device calibration
Peter Hutterer
peter.hutterer at who-t.net
Tue Aug 26 21:31:30 PDT 2014
This series fixes calibration support in libinput.
The two simple changes: calibration is now applied to multitouch events as
well, and instead of libinput_device_calibrate() there is the quartett of
configuration hooks:
libinput_device_config_calibration_has/set/get/get_default_matrix()
The more complicated issue:
WL_CALIBRATION is currently broken, and either way the current requirements
are...not ideal.
It's a 3x3 matrix, with the right-most column being the translation
component. and that is unfortunately in pixels. Because of that, the
translation must be applied _after_ scaling to screen coordinates and that
is not something libinput can do. In the current API we only have that
information in get_x_transformed(), but even then we only have either width
or height, not both. that aside, a calibration matrix in pixels is obviously
screen-size dependent.
This patchset changes the libinput calibration support to be normalized to
the device, so any translation component is specified in device widths/heights.
This means that e.g. a device that is mounted upside down always has the
same matrix, regardless of the screen resolution.
The weston patch adds the required bit to weston to take the WL_CALIBRATION
setting and normalize it.
Cheers,
Peter
More information about the wayland-devel
mailing list