diff options
author | Matthias Clasen <mclasen@redhat.com> | 2020-05-09 10:33:02 -0400 |
---|---|---|
committer | Matthias Clasen <mclasen@redhat.com> | 2020-05-11 12:20:59 -0400 |
commit | 025375ff5f244bbf22b9bd932148dfefc3dce82d (patch) | |
tree | 0516525f4463778f4c7577d63da6cda2af64486c /gtk/gtkmain.c | |
parent | cd0081d08ab9abccc3bddc8b597413d17f2af709 (diff) | |
download | gtk+-025375ff5f244bbf22b9bd932148dfefc3dce82d.tar.gz |
Replace gtk_widget_destroy everywhere
Replace all remaining uses of gtk_widget_destroy
by gtk_container_remove or g_object_unref.
Diffstat (limited to 'gtk/gtkmain.c')
-rw-r--r-- | gtk/gtkmain.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/gtk/gtkmain.c b/gtk/gtkmain.c index 518f3aefbf..ffc3aebfd1 100644 --- a/gtk/gtkmain.c +++ b/gtk/gtkmain.c @@ -1716,9 +1716,9 @@ gtk_main_do_event (GdkEvent *event) if (!gtk_window_group_get_current_grab (window_group) || GTK_WIDGET (gtk_widget_get_root (gtk_window_group_get_current_grab (window_group))) == target_widget) { - if (!GTK_IS_WINDOW (target_widget) || + if (GTK_IS_WINDOW (target_widget) && !gtk_window_emit_close_request (GTK_WINDOW (target_widget))) - gtk_widget_destroy (target_widget); + gtk_window_destroy (GTK_WINDOW (target_widget)); } g_object_unref (target_widget); break; |