[clutter] Support multiple pointers in ClutterDragAction.
- From: Emmanuele Bassi <ebassi src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [clutter] Support multiple pointers in ClutterDragAction.
- Date: Wed, 22 Jun 2011 10:34:41 +0000 (UTC)
commit 2528ad8cb8daf56f63f72ff8f413b5b8d3aea094
Author: Peter Ward <peteraward gmail com>
Date: Tue Jun 21 23:17:51 2011 +1000
Support multiple pointers in ClutterDragAction.
https://bugzilla.gnome.org/show_bug.cgi?id=653066
clutter/clutter-drag-action.c | 6 ++++++
1 files changed, 6 insertions(+), 0 deletions(-)
---
diff --git a/clutter/clutter-drag-action.c b/clutter/clutter-drag-action.c
index 05a6e03..c8302be 100644
--- a/clutter/clutter-drag-action.c
+++ b/clutter/clutter-drag-action.c
@@ -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;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]