summaryrefslogtreecommitdiff
path: root/clutter/clutter-main.c
diff options
context:
space:
mode:
authorLionel Landwerlin <llandwerlin@gmail.com>2012-06-17 00:44:44 +0100
committerLionel Landwerlin <llandwerlin@gmail.com>2012-06-22 21:48:58 +0100
commit927624d92c3cd66e5a4e3c07e9d2d9c62c974908 (patch)
treea4549020e63eb3621f7354063d03c35ee9da26f7 /clutter/clutter-main.c
parent132e4b98d18e411a8323925a557936dbd0d840fa (diff)
downloadclutter-927624d92c3cd66e5a4e3c07e9d2d9c62c974908.tar.gz
input-device: add APIs to grab sequences of touch events
https://bugzilla.gnome.org/show_bug.cgi?id=678279
Diffstat (limited to 'clutter/clutter-main.c')
-rw-r--r--clutter/clutter-main.c22
1 files changed, 21 insertions, 1 deletions
diff --git a/clutter/clutter-main.c b/clutter/clutter-main.c
index fb1b56e8a..64df9f56e 100644
--- a/clutter/clutter-main.c
+++ b/clutter/clutter-main.c
@@ -2315,6 +2315,26 @@ emit_pointer_event (ClutterEvent *event,
}
static inline void
+emit_touch_event (ClutterEvent *event,
+ ClutterInputDevice *device)
+{
+ ClutterActor *grab_actor;
+
+ if ((device->sequence_grab_actors != NULL) &&
+ ((grab_actor = g_hash_table_lookup (device->sequence_grab_actors,
+ event->touch.sequence)) != NULL))
+ {
+ /* sequence grab */
+ clutter_actor_event (grab_actor, event, FALSE);
+ }
+ else
+ {
+ /* no grab, time to capture and bubble */
+ emit_event (event, FALSE);
+ }
+}
+
+static inline void
emit_keyboard_event (ClutterEvent *event,
ClutterInputDevice *device)
{
@@ -2644,7 +2664,7 @@ _clutter_process_event_details (ClutterActor *stage,
x, y,
actor);
- emit_pointer_event (event, device);
+ emit_touch_event (event, device);
break;
}