Commit b5c319b5 authored by Carlos Garnacho's avatar Carlos Garnacho

gesture: Limit API calls to non-denied sequences

Gestures do track those internally, but information about those
shouldn't be leaked on calls.
parent 2285157c
......@@ -915,13 +915,9 @@ gtk_gesture_get_bounding_box_center (GtkGesture *gesture,
gboolean
gtk_gesture_is_active (GtkGesture *gesture)
{
GtkGesturePrivate *priv;
g_return_val_if_fail (GTK_IS_GESTURE (gesture), FALSE);
priv = gtk_gesture_get_instance_private (gesture);
return g_hash_table_size (priv->points) != 0;
return _gtk_gesture_effective_n_points (gesture) != 0;
}
/**
......@@ -989,12 +985,20 @@ gtk_gesture_handles_sequence (GtkGesture *gesture,
GdkEventSequence *sequence)
{
GtkGesturePrivate *priv;
PointData *data;
g_return_val_if_fail (GTK_IS_GESTURE (gesture), FALSE);
priv = gtk_gesture_get_instance_private (gesture);
data = g_hash_table_lookup (priv->points, sequence);
return g_hash_table_contains (priv->points, sequence);
if (!data)
return FALSE;
if (data->state == GTK_EVENT_SEQUENCE_DENIED)
return FALSE;
return TRUE;
}
/**
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment