diff options
author | Peter Bloomfield <PeterBloomfield@bellsouth.net> | 2018-12-17 12:04:10 -0500 |
---|---|---|
committer | Peter Bloomfield <PeterBloomfield@bellsouth.net> | 2018-12-17 12:04:10 -0500 |
commit | 8a27302d56e4fb271103627d380499781b3e14ed (patch) | |
tree | 80099ed1e981ff74c6809880112ed012467d2c7b /gtk | |
parent | 8ce01084afea49c8aaacf9bd052c969d974ab81b (diff) | |
download | gtk+-8a27302d56e4fb271103627d380499781b3e14ed.tar.gz |
gtkmain: Terminate two loops early
In propagate_event_{down,up}(), set handled_event to TRUE if a widget is
unrealized, so as to terminate the corresponding loop early.
See https://gitlab.gnome.org/GNOME/gtk/merge_requests/442
Diffstat (limited to 'gtk')
-rw-r--r-- | gtk/gtkmain.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/gtk/gtkmain.c b/gtk/gtkmain.c index ecd9f44781..35a5e77003 100644 --- a/gtk/gtkmain.c +++ b/gtk/gtkmain.c @@ -2439,6 +2439,8 @@ propagate_event_up (GtkWidget *widget, else if (gtk_widget_get_realized (widget)) handled_event = gtk_widget_event (widget, event); + handled_event |= !gtk_widget_get_realized (widget); + tmp = gtk_widget_get_parent (widget); g_object_unref (widget); @@ -2492,6 +2494,8 @@ propagate_event_down (GtkWidget *widget, } else if (gtk_widget_get_realized (widget)) handled_event = _gtk_widget_captured_event (widget, event); + + handled_event |= !gtk_widget_get_realized (widget); } g_list_free_full (widgets, (GDestroyNotify)g_object_unref); |