Skip to content
Commit c4689ff1 authored by Louis-Francis Ratté-Boulianne's avatar Louis-Francis Ratté-Boulianne Committed by Pekka Paalanen
Browse files

input: introduce touch event mode for calibrator



In addition to the normal touch event processing mode, introduce a new
mode for calibrating a touchscreen input device.

In the calibration mode, normal touch event processing is skipped, and
the raw events are forwarded to the calibrator instead. The calibrator
is not yet implemented, so the calls will be added in a following patch.

To switch between modes, two functions are added, one for entering each
mode. The mode switch happens only when no touches are down on any touch
device, to avoid confusing touch grabs and clients. To realise this, the
state machine has four states: prepare and actual state for both normal
and calibrator modes.

At this point nothing will attempt to change the touch event mode.

The new calibrator mode is necessary, because when calibrating a
touchscreen, the touch events must be routed to the calibration client
directly. The touch coordinates are expected to be wrong, so they cannot
go through the normal focus surface picking. The calibrator code also
cannot use the normal touch grab interface, because it needs to be able
to distinguish between different physical touch input devices, even if
they are part of the same weston_seat. This requirement makes
calibration special enough to warrant the new mode, a sort of "super
grab".

Co-developed by Louis-Francis and Pekka.

Signed-off-by: default avatarLouis-Francis Ratté-Boulianne <lfrb@collabora.com>
Signed-off-by: default avatarPekka Paalanen <pekka.paalanen@collabora.co.uk>
v1 Tested-by: default avatarMatt Hoosier <matt.hoosier@gmail.com>
Reviewed-by: default avatarPeter Hutterer <peter.hutterer@who-t.net>
parent 332a45e0
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment