mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2025-01-14 14:20:21 +00:00
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
This commit is contained in:
parent
a5bd1474d5
commit
2d7b9273cf
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user