drop-action: Use the right state for events

The 'state' field should be used for pointer events without button
information. Pointer events that have button information should use
the 'button' field.

https://bugzilla.gnome.org/show_bug.cgi?id=732143
gesture-action: Ignore any other event than press/update/release ones

CLUTTER_ENTER/LEAVE might be processed too, leading to accounting of the
NULL sequence (ie. pointer) in the gesture, and fooling the gesture with
a static extra point that wouldn't go away.

https://bugzilla.gnome.org/show_bug.cgi?id=732235
(cherry picked from commit 02590f08ac81a24c476fdf18d79ceffdfe7f1a34)
Signed-off-by: Emmanuele Bassi <ebassi@gnome.org>
gesture-action: Use event type getter

Don't use direct struct access.

(cherry picked from commit 036c2b3764824a8980b1ae052df4becdb26d4bbb)
Signed-off-by: Emmanuele Bassi <ebassi@gnome.org>
input-device: Do not unset the device stage after the last touch is lifted

On X11 the pointer will follow a "pointer emulating" touch sequence, so the
pointer will be effectively left inside the stage after that touch is lifted,
even though the master device stage is unset. This makes pointer events get
ignored until the pointer leaves and enters again the stage.

https://bugzilla.gnome.org/show_bug.cgi?id=732234
(cherry picked from commit 42f6828c9cf151e350dd0df47a194cf0ac63a904)
Signed-off-by: Emmanuele Bassi <ebassi@gnome.org>
x11: Set the input device stage on XI_TouchBegin, if not already set

Until now, touch events sort of rely on XI_Enter/XI_Leave events accompanying
the pointer emulating touch in order to have a stage set on the device, These
events won't happen though if it's not a pointer emulating touch which happens
on the stage, causing touch events to be ignored.

Fix this by ensuring that the input device has a stage on XI_TouchBegin itself,
but only if it's not already set, so we don't possibly steal touch events to
an already interacting stage.

https://bugzilla.gnome.org/show_bug.cgi?id=732234
(cherry picked from commit 4c4e72a9dc3674774a8d38054a4bb8b95fdd972b)
Signed-off-by: Emmanuele Bassi <ebassi@gnome.org>
conform: Ensure to disable diagnostic messages

We don't want tests to fail for deprecation messages; we already disable
deprecation warnings from the compiler for the same reason.

(cherry picked from commit 9c9b37cb210db79efc95f037d565587e3fbb7fd3)
Signed-off-by: Emmanuele Bassi <ebassi@gnome.org>