mirror of
https://github.com/brl/mutter.git
synced 2024-11-22 16:10:41 -05:00
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;
|
||||
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;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user