drag-action: don't mix touch and pointer events
https://bugzilla.gnome.org/show_bug.cgi?id=709762
This commit is contained in:
parent
7c2b88f73b
commit
f70eee0748
@ -364,13 +364,13 @@ on_captured_event (ClutterActor *stage,
|
|||||||
if (!priv->in_drag)
|
if (!priv->in_drag)
|
||||||
return CLUTTER_EVENT_PROPAGATE;
|
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;
|
return CLUTTER_EVENT_PROPAGATE;
|
||||||
|
|
||||||
switch (clutter_event_type (event))
|
switch (clutter_event_type (event))
|
||||||
{
|
{
|
||||||
case CLUTTER_TOUCH_UPDATE:
|
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;
|
break;
|
||||||
|
|
||||||
@ -391,7 +391,6 @@ on_captured_event (ClutterActor *stage,
|
|||||||
|
|
||||||
case CLUTTER_TOUCH_END:
|
case CLUTTER_TOUCH_END:
|
||||||
case CLUTTER_TOUCH_CANCEL:
|
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;
|
break;
|
||||||
|
|
||||||
@ -427,6 +426,8 @@ on_drag_begin (ClutterActor *actor,
|
|||||||
switch (clutter_event_type (event))
|
switch (clutter_event_type (event))
|
||||||
{
|
{
|
||||||
case CLUTTER_BUTTON_PRESS:
|
case CLUTTER_BUTTON_PRESS:
|
||||||
|
if (priv->sequence != NULL)
|
||||||
|
return CLUTTER_EVENT_PROPAGATE;
|
||||||
if (clutter_event_get_button (event) != CLUTTER_BUTTON_PRIMARY)
|
if (clutter_event_get_button (event) != CLUTTER_BUTTON_PRIMARY)
|
||||||
return CLUTTER_EVENT_PROPAGATE;
|
return CLUTTER_EVENT_PROPAGATE;
|
||||||
break;
|
break;
|
||||||
|
Loading…
Reference in New Issue
Block a user