…xing property issue on invert axes
From evdev 2.3.2 onwards, it does something crazy when the invertX/Y option is manually set This has to be undone in the calibrator before doing the calib calculation. I say 'manually set' above because invertX/Y is a useless option: xf86ScaleAxis can deal with axis inversion automatically, hence, nobody should ever ever set invertX/Y ever. Just let the calibrator calculate the calibration for you!
Evdev 2.7.0 tester It shows that the evdev regression is in the use of the invert_x/invert_y option, together with axis swapping (which is silly, because invert_x/invert_y are options you don't manually need to specify because of the mathematical properties of xf86ScaleAxis)
changed GuiCalibratorX11::redraw() to fall back to X if xrandr is not available
The tester will serve to test the calibration code, while doing so, it will make the assumptions about the calibration in the driver (e.g. how it uses the calibration values, and especially swap_xy and inversion and the like) explicit. The goal is to give assurances about the correctness of the calibration, without needing to have devices in all possible swapaxes/inversion combinations.
This patch was originally part of Antoine Hue's commit with message '''Managing correctly X/Y swap and X or Y inversion: - detect swap and inversion modification - take into account for inversion in calibration computation since Evdev is doing inversion after calibration. - Mainly tested for Evdev based driver. To be tested for USB.''' Signed-off-by: Tias Guns <firstname.lastname@example.org>
previously, new_axys.swap_xy meant that the old swap_xy value needed to be swapped. Now, new_axys is initialised to old_axys, such that setting new_axys.do_swap_xy() swaps the axys and hence new_axys contains the axys values to write. Similar for invert_x, invert_y Changes to Usbtouchscreen were not needed as it resets swap/inversion values to 'false' before doing calibration.