From f70eee07483389733981df710ab1a1b80fee620d Mon Sep 17 00:00:00 2001 From: Lionel Landwerlin Date: Wed, 9 Oct 2013 18:39:59 +0100 Subject: [PATCH] drag-action: don't mix touch and pointer events https://bugzilla.gnome.org/show_bug.cgi?id=709762 --- clutter/clutter-drag-action.c | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/clutter/clutter-drag-action.c b/clutter/clutter-drag-action.c index e450046e8..c80545368 100644 --- a/clutter/clutter-drag-action.c +++ b/clutter/clutter-drag-action.c @@ -364,14 +364,14 @@ on_captured_event (ClutterActor *stage, if (!priv->in_drag) return CLUTTER_EVENT_PROPAGATE; - if (clutter_event_get_device (event) != priv->device) + if (clutter_event_get_device (event) != priv->device || + clutter_event_get_event_sequence (event) != priv->sequence) return CLUTTER_EVENT_PROPAGATE; switch (clutter_event_type (event)) { case CLUTTER_TOUCH_UPDATE: - if (clutter_event_get_event_sequence (event) == priv->sequence) - emit_drag_motion (action, actor, event); + emit_drag_motion (action, actor, event); break; case CLUTTER_MOTION: @@ -391,8 +391,7 @@ on_captured_event (ClutterActor *stage, case CLUTTER_TOUCH_END: case CLUTTER_TOUCH_CANCEL: - if (clutter_event_get_event_sequence (event) == priv->sequence) - emit_drag_end (action, actor, event); + emit_drag_end (action, actor, event); break; case CLUTTER_BUTTON_RELEASE: @@ -427,6 +426,8 @@ on_drag_begin (ClutterActor *actor, switch (clutter_event_type (event)) { case CLUTTER_BUTTON_PRESS: + if (priv->sequence != NULL) + return CLUTTER_EVENT_PROPAGATE; if (clutter_event_get_button (event) != CLUTTER_BUTTON_PRIMARY) return CLUTTER_EVENT_PROPAGATE; break;