From 62507776fe54adf27c2113da741009b9931ce0ef Mon Sep 17 00:00:00 2001 From: Carlos Garnacho Date: Mon, 11 Aug 2014 16:44:51 +0200 Subject: [PATCH] widget: Include event controllers' event mask on gtk_widget_get_events() gtk_widget_get_events() must indeed tell about events enabled purely through a GtkEventController, those events will most surely trigger event handlers. https://bugzilla.gnome.org/show_bug.cgi?id=734357 --- gtk/gtkwidget.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/gtk/gtkwidget.c b/gtk/gtkwidget.c index 1fa2958802..83ff4fdfbb 100644 --- a/gtk/gtkwidget.c +++ b/gtk/gtkwidget.c @@ -11522,6 +11522,11 @@ gtk_widget_get_settings (GtkWidget *widget) * from the #GdkEventMask enumeration). These are the events that the widget * will receive. * + * Note: Internally, the widget event mask will be the logical OR of the event + * mask set through gtk_widget_set_events() or gtk_widget_add_events(), and the + * event mask necessary to cater for every #GtkEventController created for the + * widget. + * * Returns: event mask for @widget **/ gint @@ -11529,7 +11534,8 @@ gtk_widget_get_events (GtkWidget *widget) { g_return_val_if_fail (GTK_IS_WIDGET (widget), 0); - return GPOINTER_TO_INT (g_object_get_qdata (G_OBJECT (widget), quark_event_mask)); + return GPOINTER_TO_INT (g_object_get_qdata (G_OBJECT (widget), quark_event_mask)) | + _gtk_widget_get_controllers_evmask (widget); } /**