[gtk/readonly-events-1: 21/32] gtk: Stop handling GDK_DESTROY differently from GDK_DELETE
- From: Matthias Clasen <matthiasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk/readonly-events-1: 21/32] gtk: Stop handling GDK_DESTROY differently from GDK_DELETE
- Date: Sat, 15 Feb 2020 20:12:29 +0000 (UTC)
commit 93525a3319843b63acae78c80827e4882b33d85b
Author: Matthias Clasen <mclasen redhat com>
Date: Sat Feb 15 11:11:13 2020 -0500
gtk: Stop handling GDK_DESTROY differently from GDK_DELETE
We don't have child windows anymore, so there is no difference.
gtk/gtkmain.c | 15 +--------------
1 file changed, 1 insertion(+), 14 deletions(-)
---
diff --git a/gtk/gtkmain.c b/gtk/gtkmain.c
index c71826abc9..cce91e71d4 100644
--- a/gtk/gtkmain.c
+++ b/gtk/gtkmain.c
@@ -1787,6 +1787,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)
@@ -1798,20 +1799,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))
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]