Remove unused function parameter

Signed-off-by: Jason Gerecke <killertofu@gmail.com>
Acked-by: Peter Hutterer <peter.hutterer@who-t.net>
Change function signature of commonDispatchDevice

Changes commonDispatchDevice to take an InputInfoPtr rather than a
WacomCommonPtr. This is in prepraration for the next patch where
an InputInfoPtr will be required in wcmEvent. To make this happen,
the call to 'findTool' is moved to wcmEvent. This also allows us
to remove the one-off setting of 'priv' only for touch devices.

Signed-off-by: Jason Gerecke <killertofu@gmail.com>
Acked-by: Peter Hutterer <peter.hutterer@who-t.net>
Support cross-device pointer arbitration

Currently pointer arbitration is taken care of through the use of
a 'wcomPenInProx' variable in the WacomCommonRec. If two devices
share a 'common' variable, the commonDispatchDevice function will
ensure that touches do not move the pointer while the pen is in
proximity.

This patch adds support for cross-device pointer arbitration to
prevent other touches known to the driver from moving the pointer.
This is achieved with the introduction of a 'WACOM_DRIVER' structure
that is shared by all tools. Inside this structure is an 'active'
variable that keeps track of the last tool which was actively
controlling the pointer. When an event from any tool comes in, the
driver will attempt to determine if it should be filtered or not.
In some cases, the new device will be allowed to take control of
the pointer, and become the new active device.

Note that arbitration occurs *after* we store the device state
to pChannel->valid.state. The code in wcmTouchFilter.c assumes
that states are not missing, and can become desynchronized from
reality if (for example) a finger were to go out of prox without
a corresponding state update.

Signed-off-by: Jason Gerecke <killertofu@gmail.com>
Acked-by: Peter Hutterer <peter.hutterer@who-t.net>
Add new GESTURE_CANCEL_MODE and wcmCancelGesture function

The new GESTURE_CANCEL_MODE is used to short-circuit the gesture
recognition logic until all touches have been removed from the device.
By using the wcmCancelGesture function, any in-progress gesture will
be canceled and cause the driver to ignore further touch input until a
new gesture is started.

This is used by the arbitration logic to ensure that touches which
accumulate in the valid.state list while a pen is in proximity do not
suddenly trigger a gesture at the moment the pen leaves prox.

Signed-off-by: Jason Gerecke <killertofu@gmail.com>
Acked-by: Peter Hutterer <peter.hutterer@who-t.net>
conf: Match Hanwang tablets in their own section

Signed-off-by: Jason Gerecke <killertofu@gmail.com>
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
conf: Add new InputDevice matches based on USB and PnP ID

If the kernel's HID driver is used rather than wacom.ko, its very
possible that the device will not have "Wacom" anywhere in its
device name. To ensure we are able to match Wacom tablets in this
situation, we add matches based on the known USB and PnP IDs.

Signed-off-by: Jason Gerecke <killertofu@gmail.com>
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>