[gtk+] gdk: Remove GdkDisplay from GdkEventPrivate
- From: Carlos Garnacho <carlosg src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+] gdk: Remove GdkDisplay from GdkEventPrivate
- Date: Thu, 14 Dec 2017 00:08:11 +0000 (UTC)
commit 1e1f2a6e67d0eadea30b79d644ee4c9310a1c266
Author: Carlos Garnacho <carlosg gnome org>
Date: Wed Oct 25 14:06:20 2017 +0200
gdk: Remove GdkDisplay from GdkEventPrivate
And add it to GdkEventAny.
gdk/gdkevents.c | 20 +++-----------------
gdk/gdkeventsprivate.h | 1 +
gdk/gdkinternals.h | 1 -
3 files changed, 4 insertions(+), 18 deletions(-)
---
diff --git a/gdk/gdkevents.c b/gdk/gdkevents.c
index 9264630..2fb9cc8 100644
--- a/gdk/gdkevents.c
+++ b/gdk/gdkevents.c
@@ -375,8 +375,6 @@ gdk_event_new (GdkEventType type)
event_hash = g_hash_table_new (g_direct_hash, NULL);
new_private = g_slice_new0 (GdkEventPrivate);
-
- new_private->display = NULL;
g_hash_table_insert (event_hash, new_private, GUINT_TO_POINTER (1));
@@ -524,7 +522,6 @@ gdk_event_copy (const GdkEvent *event)
{
GdkEventPrivate *private = (GdkEventPrivate *)event;
- new_private->display = private->display;
g_set_object (&new_private->user_data, private->user_data);
}
@@ -1761,25 +1758,14 @@ void
gdk_event_set_display (GdkEvent *event,
GdkDisplay *display)
{
- GdkEventPrivate *private;
-
- g_return_if_fail (gdk_event_is_allocated (event));
-
- private = (GdkEventPrivate *)event;
-
- private->display = display;
+ event->any.display = display;
}
GdkDisplay *
gdk_event_get_display (const GdkEvent *event)
{
- if (gdk_event_is_allocated (event))
- {
- GdkEventPrivate *private = (GdkEventPrivate *)event;
-
- if (private->display)
- return private->display;
- }
+ if (event->any.display)
+ return event->any.display;
if (event->any.window)
return gdk_window_get_display (event->any.window);
diff --git a/gdk/gdkeventsprivate.h b/gdk/gdkeventsprivate.h
index 50931b8..4a8762d 100644
--- a/gdk/gdkeventsprivate.h
+++ b/gdk/gdkeventsprivate.h
@@ -48,6 +48,7 @@ struct _GdkEventAny
gint8 send_event;
GdkDevice *device;
GdkDevice *source_device;
+ GdkDisplay *display;
};
/**
diff --git a/gdk/gdkinternals.h b/gdk/gdkinternals.h
index 6bba4d2..8484114 100644
--- a/gdk/gdkinternals.h
+++ b/gdk/gdkinternals.h
@@ -146,7 +146,6 @@ typedef enum
struct _GdkEventPrivate
{
GdkEvent event;
- GdkDisplay *display;
GObject *user_data;
};
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]