[clutter/clutter-1.16] drag-action: don't mix touch and pointer events
- From: Lionel Landwerlin <llandwerlin src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [clutter/clutter-1.16] drag-action: don't mix touch and pointer events
- Date: Mon, 14 Oct 2013 16:44:56 +0000 (UTC)
commit ccd2d4c0a7a789e3aea410f9fafd494949fb0c87
Author: Lionel Landwerlin <llandwerlin gmail com>
Date: Wed Oct 9 18:39:59 2013 +0100
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 files changed, 6 insertions(+), 5 deletions(-)
---
diff --git a/clutter/clutter-drag-action.c b/clutter/clutter-drag-action.c
index e450046..c805453 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;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]