[gtk/wip/carlosg/key-controller-fixes: 3/3] gtkwidget: Ensure to run key controllers in the bubble phase
- From: Carlos Garnacho <carlosg src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk/wip/carlosg/key-controller-fixes: 3/3] gtkwidget: Ensure to run key controllers in the bubble phase
- Date: Mon, 21 Oct 2019 21:45:43 +0000 (UTC)
commit 65bb9c505ad4474aa08fe776ff7cd27b3891fefd
Author: Carlos Garnacho <carlosg gnome org>
Date: Mon Oct 21 23:42:19 2019 +0200
gtkwidget: Ensure to run key controllers in the bubble phase
We fall back on controllers in event handlers' default handler,
but we weren't doing so for GDK_KEY_PRESS/RELEASE.
gtk/gtkwidget.c | 8 ++++++++
1 file changed, 8 insertions(+)
---
diff --git a/gtk/gtkwidget.c b/gtk/gtkwidget.c
index 2848d757b5..fbd2548e52 100644
--- a/gtk/gtkwidget.c
+++ b/gtk/gtkwidget.c
@@ -7206,6 +7206,10 @@ static gboolean
gtk_widget_real_key_press_event (GtkWidget *widget,
GdkEventKey *event)
{
+ if (_gtk_widget_run_controllers (widget, (GdkEvent *) event,
+ GTK_PHASE_BUBBLE))
+ return GDK_EVENT_STOP;
+
return gtk_bindings_activate_event (G_OBJECT (widget), event);
}
@@ -7213,6 +7217,10 @@ static gboolean
gtk_widget_real_key_release_event (GtkWidget *widget,
GdkEventKey *event)
{
+ if (_gtk_widget_run_controllers (widget, (GdkEvent *) event,
+ GTK_PHASE_BUBBLE))
+ return GDK_EVENT_STOP;
+
return gtk_bindings_activate_event (G_OBJECT (widget), event);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]