Support multiple pointers in ClutterDragAction.

https://bugzilla.gnome.org/show_bug.cgi?id=653066
This commit is contained in:
Peter Ward 2011-06-21 23:17:51 +10:00 committed by Emmanuele Bassi
parent 0788c85df1
commit 2528ad8cb8

View File

@ -78,6 +78,7 @@ struct _ClutterDragActionPrivate
ClutterActor *drag_handle;
ClutterDragAxis drag_axis;
ClutterInputDevice *device;
gulong button_press_id;
gulong capture_id;
@ -290,6 +291,9 @@ on_captured_event (ClutterActor *stage,
if (!priv->in_drag)
return FALSE;
if (clutter_event_get_device (event) != priv->device)
return FALSE;
switch (clutter_event_type (event))
{
case CLUTTER_MOTION:
@ -344,6 +348,8 @@ on_button_press (ClutterActor *actor,
clutter_event_get_coords (event, &priv->press_x, &priv->press_y);
priv->press_state = clutter_event_get_state (event);
priv->device = clutter_event_get_device (event);
priv->last_motion_x = priv->press_x;
priv->last_motion_y = priv->press_y;