[gtk/wip/otte/dnd] x11: Don't sneakily allocate memory in initializers
- From: Benjamin Otte <otte src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk/wip/otte/dnd] x11: Don't sneakily allocate memory in initializers
- Date: Tue, 29 May 2018 17:03:20 +0000 (UTC)
commit a44f0c4f0b4c83812248950d027a0dd1a3c6dc8f
Author: Benjamin Otte <otte redhat com>
Date: Tue May 22 15:48:50 2018 +0200
x11: Don't sneakily allocate memory in initializers
gdk/x11/gdkeventsource.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/gdk/x11/gdkeventsource.c b/gdk/x11/gdkeventsource.c
index f5c68a5728..5e9a7df5ae 100644
--- a/gdk/x11/gdkeventsource.c
+++ b/gdk/x11/gdkeventsource.c
@@ -228,7 +228,7 @@ gdk_event_source_translate_event (GdkX11Display *x11_display,
const XEvent *xevent)
{
GdkEventSource *event_source = (GdkEventSource *) x11_display->event_source;
- GdkEvent *event = gdk_event_new (GDK_NOTHING);
+ GdkEvent *event;
GdkFilterReturn result = GDK_FILTER_CONTINUE;
GdkDisplay *display = GDK_DISPLAY (x11_display);
GdkEventTranslator *event_translator;
@@ -238,9 +238,9 @@ gdk_event_source_translate_event (GdkX11Display *x11_display,
gpointer cache;
x11_screen = GDK_X11_DISPLAY (display)->screen;
-
dpy = GDK_DISPLAY_XDISPLAY (display);
+ event = gdk_event_new (GDK_NOTHING);
filter_surface = gdk_event_source_get_filter_surface (event_source, xevent,
&event_translator);
if (filter_surface)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]