summaryrefslogtreecommitdiff
path: root/gtk/gtkmain.c
diff options
context:
space:
mode:
authorMatthias Clasen <mclasen@redhat.com>2020-02-15 11:11:13 -0500
committerMatthias Clasen <mclasen@redhat.com>2020-02-21 00:40:52 -0500
commit7db8be93f44b2575eb61e264301d4c9ea12a892b (patch)
tree8a681f71e6263cb6815d9cadddcdd4e06f621fa5 /gtk/gtkmain.c
parent047c18844c96a3c9ead0f5fa8a48d3652e043fbf (diff)
downloadgtk+-7db8be93f44b2575eb61e264301d4c9ea12a892b.tar.gz
gtk: Stop handling GDK_DESTROY differently from GDK_DELETE
We don't have child windows anymore, so there is no difference.
Diffstat (limited to 'gtk/gtkmain.c')
-rw-r--r--gtk/gtkmain.c15
1 files changed, 1 insertions, 14 deletions
diff --git a/gtk/gtkmain.c b/gtk/gtkmain.c
index 7bb9eae7b6..f492b3b2b3 100644
--- a/gtk/gtkmain.c
+++ b/gtk/gtkmain.c
@@ -1841,6 +1841,7 @@ gtk_main_do_event (GdkEvent *event)
break;
case GDK_DELETE:
+ case GDK_DESTROY:
g_object_ref (target_widget);
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)
@@ -1852,20 +1853,6 @@ gtk_main_do_event (GdkEvent *event)
g_object_unref (target_widget);
break;
- case GDK_DESTROY:
- /* Unexpected GDK_DESTROY from the outside, ignore for
- * child windows, handle like a GDK_DELETE for toplevels
- */
- if (!gtk_widget_get_parent (target_widget))
- {
- g_object_ref (target_widget);
- if (!gtk_widget_event (target_widget, event) &&
- gtk_widget_get_realized (target_widget))
- gtk_widget_destroy (target_widget);
- g_object_unref (target_widget);
- }
- break;
-
case GDK_FOCUS_CHANGE:
case GDK_GRAB_BROKEN:
if (!_gtk_widget_captured_event (target_widget, event))