inspector: ensure controller is a GtkGesture
While GtkEventController implementations today are all GtkGesture, it is possible to create a GtkEventController manually. This is an extrac check to ensure we only add gestures to the list. https://bugzilla.gnome.org/show_bug.cgi?id=774760
This commit is contained in:
@ -195,7 +195,12 @@ gtk_inspector_gestures_set_object (GtkInspectorGestures *sl,
|
|||||||
{
|
{
|
||||||
list = _gtk_widget_list_controllers (GTK_WIDGET (object), phase);
|
list = _gtk_widget_list_controllers (GTK_WIDGET (object), phase);
|
||||||
for (l = list; l; l = l->next)
|
for (l = list; l; l = l->next)
|
||||||
g_hash_table_insert (hash, l->data, GINT_TO_POINTER (phase));
|
{
|
||||||
|
GtkEventController *controller = l->data;
|
||||||
|
|
||||||
|
if (GTK_IS_GESTURE (controller))
|
||||||
|
g_hash_table_insert (hash, controller, GINT_TO_POINTER (phase));
|
||||||
|
}
|
||||||
g_list_free (list);
|
g_list_free (list);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user