[gtk+/gtk-3-12] window: Be more careful when propagating key events
- From: Matthias Clasen <matthiasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+/gtk-3-12] window: Be more careful when propagating key events
- Date: Sat, 12 Apr 2014 16:02:16 +0000 (UTC)
commit edcea7e60bb4a7a63cfde72b9077b93b19a64552
Author: Matthias Clasen <mclasen redhat com>
Date: Sat Apr 5 11:43:43 2014 -0400
window: Be more careful when propagating key events
We are keeping references on the widget we are handling as we
are iterating up, but that doesn't protect us against the entire
tree being axed from inside gtk_widget_handle_event.
https://bugzilla.gnome.org/show_bug.cgi?id=727644
gtk/gtkwindow.c | 6 +++++-
1 files changed, 5 insertions(+), 1 deletions(-)
---
diff --git a/gtk/gtkwindow.c b/gtk/gtkwindow.c
index d791186..b6f6997 100644
--- a/gtk/gtkwindow.c
+++ b/gtk/gtkwindow.c
@@ -7613,7 +7613,11 @@ gtk_window_propagate_key_event (GtkWindow *window,
GtkWidget *parent;
if (gtk_widget_is_sensitive (focus))
- handled = gtk_widget_event (focus, (GdkEvent*) event);
+ {
+ handled = gtk_widget_event (focus, (GdkEvent*) event);
+ if (handled)
+ break;
+ }
parent = gtk_widget_get_parent (focus);
if (parent)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]