diff --git a/src/core/meta-gesture-tracker-private.h b/src/core/meta-gesture-tracker-private.h index 94625aa23..6f38274e5 100644 --- a/src/core/meta-gesture-tracker-private.h +++ b/src/core/meta-gesture-tracker-private.h @@ -72,5 +72,6 @@ MetaSequenceState meta_gesture_tracker_get_sequence_state (MetaGestureTracker ClutterEventSequence *sequence); gboolean meta_gesture_tracker_consumes_event (MetaGestureTracker *tracker, const ClutterEvent *event); +gint meta_gesture_tracker_get_n_current_touches (MetaGestureTracker *tracker); #endif /* META_GESTURE_TRACKER_PRIVATE_H */ diff --git a/src/core/meta-gesture-tracker.c b/src/core/meta-gesture-tracker.c index 10d9ca6d1..75a961cf5 100644 --- a/src/core/meta-gesture-tracker.c +++ b/src/core/meta-gesture-tracker.c @@ -565,3 +565,14 @@ meta_gesture_tracker_consumes_event (MetaGestureTracker *tracker, return (event->type != CLUTTER_TOUCH_END && (state == META_SEQUENCE_REJECTED || state == META_SEQUENCE_PENDING_END)); } + +gint +meta_gesture_tracker_get_n_current_touches (MetaGestureTracker *tracker) +{ + MetaGestureTrackerPrivate *priv; + + g_return_val_if_fail (META_IS_GESTURE_TRACKER (tracker), 0); + + priv = meta_gesture_tracker_get_instance_private (tracker); + return g_hash_table_size (priv->sequences); +}