[gtk+] gdk: Remove gdk_event_is_allocated()
- From: Carlos Garnacho <carlosg src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+] gdk: Remove gdk_event_is_allocated()
- Date: Thu, 14 Dec 2017 00:08:26 +0000 (UTC)
commit ca89ad75b4b43be2155b1a9f59802adaf191c566
Author: Carlos Garnacho <carlosg gnome org>
Date: Wed Oct 25 14:21:38 2017 +0200
gdk: Remove gdk_event_is_allocated()
All events are allocated now.
gdk/gdkevents.c | 21 +--------------------
1 files changed, 1 insertions(+), 20 deletions(-)
---
diff --git a/gdk/gdkevents.c b/gdk/gdkevents.c
index 80f92ec..44e660c 100644
--- a/gdk/gdkevents.c
+++ b/gdk/gdkevents.c
@@ -376,8 +376,6 @@ gdk_event_handler_set (GdkEventFunc func,
_gdk_event_notify = notify;
}
-static GHashTable *event_hash = NULL;
-
/**
* gdk_event_new:
* @type: a #GdkEventType
@@ -393,14 +391,9 @@ GdkEvent*
gdk_event_new (GdkEventType type)
{
GdkEvent *new_event;
-
- if (!event_hash)
- event_hash = g_hash_table_new (g_direct_hash, NULL);
new_event = g_object_new (GDK_TYPE_EVENT, NULL);
- g_hash_table_insert (event_hash, new_event, GUINT_TO_POINTER (1));
-
new_event->any.type = type;
/*
@@ -474,15 +467,6 @@ gdk_event_new (GdkEventType type)
return new_event;
}
-static gboolean
-gdk_event_is_allocated (const GdkEvent *event)
-{
- if (event_hash)
- return g_hash_table_lookup (event_hash, event) != NULL;
-
- return FALSE;
-}
-
void
gdk_event_set_pointer_emulated (GdkEvent *event,
gboolean emulated)
@@ -596,8 +580,7 @@ gdk_event_copy (const GdkEvent *event)
break;
}
- if (gdk_event_is_allocated (event))
- _gdk_display_event_data_copy (gdk_event_get_display (event), event, new_event);
+ _gdk_display_event_data_copy (gdk_event_get_display (event), event, new_event);
return new_event;
}
@@ -683,8 +666,6 @@ gdk_event_finalize (GObject *object)
g_clear_object (&event->any.device);
g_clear_object (&event->any.source_device);
- g_hash_table_remove (event_hash, event);
-
G_OBJECT_CLASS (gdk_event_parent_class)->finalize (object);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]