BTN_TOOL_* is treated as tool, just like before. BTN_TOUCH on the other hand
may need to be treated as a button left press. This again requires a button
class.
Tested on an HP Touchsmart and a Wacom tablet.
Signed-off-by: Peter Hutterer <email address hidden>
(cherry picked from commit 1b0df04abe329433658c95debdafdf1714173814)
Where an initial calibration is provided through the Calibration option
to the driver, it wasn't being exposed in the 'Evdev Axis Calibration'
property. Remedy that...
Signed-off-by: David Woodhouse <email address hidden>
Acked-by: Peter Hutterer <email address hidden>
Signed-off-by: Peter Hutterer <email address hidden>
(cherry picked from commit 7b285a802b8ccddd1edcf40ab345c4a96bcdf43c)
Swap axes before applying touch screen calibration.
When the SwapAxes option is set, the X and Y axes in calibration should
be labelled as the user perceives them -- not as the kernel sends them.
Currently, we apply the X-axis calibration to the X-axis of the input,
and then do the axis swapping so we've actually applied the X-axis
calibration to what the user sees as the Y-axis.
This patch changes the order of the operations, so that the axes are
swapped before the calibration is applied.
Signed-off-by: David Woodhouse <email address hidden>
Acked-by: Peter Hutterer <email address hidden>
Signed-off-by: Peter Hutterer <email address hidden>
(cherry picked from commit f187badb71554a73bf9ca30ce75c9d166e688f03)
Set all valuators for relative motion events (#24737)
We should process all the deltas reported by a relative motion device,
otherwise some devices such as A4Tech X-750F or similar may trigger a
situation when the `v` array contains random values (it isn't
initialized anywhere) and later we process them and in effect the mouse
cursor "jumps" on the screen.
I'm not sure why, but we also must be sure that the `first` and `last`
variables reflect the axis map, otherwise the mouse cursor "jumps" on
the screen when clicking mouse buttons in some rare cases reported by
Bartek Iwaniec on Bugzilla. That's why a simple initialization of the
`v` array with zeros isn't sufficient.