display: Implement gesture-induced touch cancellation for wayland

On wayland, touches are initially both handled by the compositor and sent
to clients, proceeding to cancellation on clients only after the compositor
claims the sequence for itself. Implement the cancellation detail through
MetaGestureTracker::state-changed.

https://bugzilla.gnome.org/show_bug.cgi?id=733631
This commit is contained in:
Carlos Garnacho 2014-07-22 01:46:42 +02:00
parent fbea59b326
commit 25b6a40ad4

View File

@ -467,6 +467,13 @@ gesture_tracker_state_changed (MetaGestureTracker *tracker,
MetaSequenceState state,
MetaDisplay *display)
{
if (meta_is_wayland_compositor ())
{
if (state == META_SEQUENCE_ACCEPTED)
meta_display_cancel_touch (display);
}
else
{
MetaBackendX11 *backend = META_BACKEND_X11 (meta_get_backend ());
int event_mode;
@ -481,6 +488,7 @@ gesture_tracker_state_changed (MetaGestureTracker *tracker,
META_VIRTUAL_CORE_POINTER_ID,
clutter_x11_event_sequence_get_touch_detail (sequence),
DefaultRootWindow (display->xdisplay), event_mode);
}
}
/**