Support multiple pointers in ClutterDragAction.
https://bugzilla.gnome.org/show_bug.cgi?id=653066
This commit is contained in:
parent
0788c85df1
commit
2528ad8cb8
@ -78,6 +78,7 @@ struct _ClutterDragActionPrivate
|
|||||||
ClutterActor *drag_handle;
|
ClutterActor *drag_handle;
|
||||||
ClutterDragAxis drag_axis;
|
ClutterDragAxis drag_axis;
|
||||||
|
|
||||||
|
ClutterInputDevice *device;
|
||||||
gulong button_press_id;
|
gulong button_press_id;
|
||||||
gulong capture_id;
|
gulong capture_id;
|
||||||
|
|
||||||
@ -290,6 +291,9 @@ on_captured_event (ClutterActor *stage,
|
|||||||
if (!priv->in_drag)
|
if (!priv->in_drag)
|
||||||
return FALSE;
|
return FALSE;
|
||||||
|
|
||||||
|
if (clutter_event_get_device (event) != priv->device)
|
||||||
|
return FALSE;
|
||||||
|
|
||||||
switch (clutter_event_type (event))
|
switch (clutter_event_type (event))
|
||||||
{
|
{
|
||||||
case CLUTTER_MOTION:
|
case CLUTTER_MOTION:
|
||||||
@ -344,6 +348,8 @@ on_button_press (ClutterActor *actor,
|
|||||||
clutter_event_get_coords (event, &priv->press_x, &priv->press_y);
|
clutter_event_get_coords (event, &priv->press_x, &priv->press_y);
|
||||||
priv->press_state = clutter_event_get_state (event);
|
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_x = priv->press_x;
|
||||||
priv->last_motion_y = priv->press_y;
|
priv->last_motion_y = priv->press_y;
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user