[gtk/readonly-events-1: 22/49] events: Drop GDK_DESTROY



commit 2a504b747e3a15584c8dbfa55757d6ffa6140a22
Author: Matthias Clasen <mclasen redhat com>
Date:   Sat Feb 15 11:19:59 2020 -0500

    events: Drop GDK_DESTROY
    
    No backend is emitting GDK_DESTROY events anymore, so no
    need to carry this around.

 gdk/gdkevents.c  | 2 --
 gdk/gdkevents.h  | 2 --
 gdk/gdksurface.c | 1 -
 gtk/gtkmain.c    | 3 +--
 4 files changed, 1 insertion(+), 7 deletions(-)
---
diff --git a/gdk/gdkevents.c b/gdk/gdkevents.c
index 27e06ea68b..be147741b2 100644
--- a/gdk/gdkevents.c
+++ b/gdk/gdkevents.c
@@ -793,7 +793,6 @@ gdk_event_get_time (const GdkEvent *event)
       case GDK_FOCUS_CHANGE:
       case GDK_NOTHING:
       case GDK_DELETE:
-      case GDK_DESTROY:
       case GDK_GRAB_BROKEN:
       case GDK_EVENT_LAST:
       default:
@@ -866,7 +865,6 @@ gdk_event_get_state (const GdkEvent  *event,
       case GDK_DROP_START:
       case GDK_NOTHING:
       case GDK_DELETE:
-      case GDK_DESTROY:
       case GDK_GRAB_BROKEN:
       case GDK_PAD_BUTTON_PRESS:
       case GDK_PAD_BUTTON_RELEASE:
diff --git a/gdk/gdkevents.h b/gdk/gdkevents.h
index 4f90cd8d07..d93e2e50ad 100644
--- a/gdk/gdkevents.h
+++ b/gdk/gdkevents.h
@@ -131,7 +131,6 @@ typedef union  _GdkEvent        GdkEvent;
  * @GDK_DELETE: the window manager has requested that the toplevel surface be
  *   hidden or destroyed, usually when the user clicks on a special icon in the
  *   title bar.
- * @GDK_DESTROY: the surface has been destroyed.
  * @GDK_MOTION_NOTIFY: the pointer (usually a mouse) has moved.
  * @GDK_BUTTON_PRESS: a mouse button has been pressed.
  * @GDK_BUTTON_RELEASE: a mouse button has been released.
@@ -187,7 +186,6 @@ typedef enum
 {
   GDK_NOTHING,
   GDK_DELETE,
-  GDK_DESTROY,
   GDK_MOTION_NOTIFY,
   GDK_BUTTON_PRESS,
   GDK_BUTTON_RELEASE,
diff --git a/gdk/gdksurface.c b/gdk/gdksurface.c
index 7eb4280f8b..18ba550c7a 100644
--- a/gdk/gdksurface.c
+++ b/gdk/gdksurface.c
@@ -4108,7 +4108,6 @@ add_event_mark (GdkEvent *event,
     case GDK_PAD_GROUP_MODE:
     case GDK_GRAB_BROKEN:
     case GDK_DELETE:
-    case GDK_DESTROY:
     case GDK_FOCUS_CHANGE:
     case GDK_PROXIMITY_IN:
     case GDK_PROXIMITY_OUT:
diff --git a/gtk/gtkmain.c b/gtk/gtkmain.c
index 3a73331e33..9996db5446 100644
--- a/gtk/gtkmain.c
+++ b/gtk/gtkmain.c
@@ -1837,7 +1837,6 @@ 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)
@@ -2345,7 +2344,7 @@ gtk_get_event_widget (const GdkEvent *event)
 
   widget = NULL;
   if (event && event->any.surface &&
-      (event->any.type == GDK_DESTROY || !gdk_surface_is_destroyed (event->any.surface)))
+      (!gdk_surface_is_destroyed (event->any.surface)))
     widget = gtk_native_get_for_surface (event->any.surface);
 
   return widget;


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]