[gtk/readonly-events-1: 7/35] Drop GDK_NOTHING
- From: Matthias Clasen <matthiasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk/readonly-events-1: 7/35] Drop GDK_NOTHING
- Date: Tue, 18 Feb 2020 05:23:08 +0000 (UTC)
commit 8e965befae35edf674351cab1b917b755eaa7acc
Author: Matthias Clasen <mclasen redhat com>
Date: Sun Feb 16 00:39:11 2020 -0500
Drop GDK_NOTHING
Events of type GDK_NOTHING are good for nothing.
gdk/gdkevents.c | 10 +---------
gdk/gdkevents.h | 2 --
gdk/gdksurface.c | 1 -
gdk/win32/gdkevents-win32.c | 1 -
gtk/gtkmain.c | 3 ---
5 files changed, 1 insertion(+), 16 deletions(-)
---
diff --git a/gdk/gdkevents.c b/gdk/gdkevents.c
index 6547b054b3..b5cd263714 100644
--- a/gdk/gdkevents.c
+++ b/gdk/gdkevents.c
@@ -80,12 +80,6 @@ check_event_sanity (GdkEvent *event)
surface = gdk_event_get_surface (event);
device = gdk_event_get_device (event);
- if (gdk_event_get_event_type (event) == GDK_NOTHING)
- {
- g_warning ("Ignoring GDK_NOTHING events; they're good for nothing");
- return FALSE;
- }
-
if (surface && display != gdk_surface_get_display (surface))
{
char *type = g_enum_to_string (GDK_TYPE_EVENT_TYPE, event->any.type);
@@ -552,7 +546,6 @@ gdk_event_get_time (const GdkEvent *event)
return event->pad_group_mode.time;
case GDK_CONFIGURE:
case GDK_FOCUS_CHANGE:
- case GDK_NOTHING:
case GDK_DELETE:
case GDK_GRAB_BROKEN:
case GDK_EVENT_LAST:
@@ -624,7 +617,6 @@ gdk_event_get_state (const GdkEvent *event,
case GDK_DRAG_LEAVE:
case GDK_DRAG_MOTION:
case GDK_DROP_START:
- case GDK_NOTHING:
case GDK_DELETE:
case GDK_GRAB_BROKEN:
case GDK_PAD_BUTTON_PRESS:
@@ -1542,7 +1534,7 @@ G_DEFINE_BOXED_TYPE (GdkEventSequence, gdk_event_sequence,
GdkEventType
gdk_event_get_event_type (const GdkEvent *event)
{
- g_return_val_if_fail (event != NULL, GDK_NOTHING);
+ g_return_val_if_fail (event != NULL, 0);
return event->any.type;
}
diff --git a/gdk/gdkevents.h b/gdk/gdkevents.h
index 4a9724487e..03d7aa28b9 100644
--- a/gdk/gdkevents.h
+++ b/gdk/gdkevents.h
@@ -124,7 +124,6 @@ typedef union _GdkEvent GdkEvent;
/**
* GdkEventType:
- * @GDK_NOTHING: a special code to indicate a null event.
* @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.
@@ -181,7 +180,6 @@ typedef union _GdkEvent GdkEvent;
*/
typedef enum
{
- GDK_NOTHING,
GDK_DELETE,
GDK_MOTION_NOTIFY,
GDK_BUTTON_PRESS,
diff --git a/gdk/gdksurface.c b/gdk/gdksurface.c
index 9a5633960a..1ad61e5ef3 100644
--- a/gdk/gdksurface.c
+++ b/gdk/gdksurface.c
@@ -4111,7 +4111,6 @@ add_event_mark (GdkEvent *event,
case GDK_FOCUS_CHANGE:
case GDK_PROXIMITY_IN:
case GDK_PROXIMITY_OUT:
- case GDK_NOTHING:
case GDK_EVENT_LAST:
default:
break;
diff --git a/gdk/win32/gdkevents-win32.c b/gdk/win32/gdkevents-win32.c
index af8755be71..c14efa9bd3 100644
--- a/gdk/win32/gdkevents-win32.c
+++ b/gdk/win32/gdkevents-win32.c
@@ -763,7 +763,6 @@ _gdk_win32_print_event (const GdkEvent *event)
switch (event->any.type)
{
#define CASE(x) case x: g_print (#x); break;
- CASE (GDK_NOTHING);
CASE (GDK_DELETE);
CASE (GDK_DESTROY);
CASE (GDK_MOTION_NOTIFY);
diff --git a/gtk/gtkmain.c b/gtk/gtkmain.c
index 0068782ee2..26199ff85f 100644
--- a/gtk/gtkmain.c
+++ b/gtk/gtkmain.c
@@ -1834,9 +1834,6 @@ gtk_main_do_event (GdkEvent *event)
*/
switch ((guint)event->any.type)
{
- case GDK_NOTHING:
- break;
-
case GDK_DELETE:
g_object_ref (target_widget);
if (!gtk_window_group_get_current_grab (window_group) ||
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]