Commit 536a7c8a authored by Matthias Clasen's avatar Matthias Clasen
Browse files

Work around issues with events without screens

Just use the default display for copy/free of event data.
Maybe the vfuncs should be moved to GdkDisplayManager.
parent 6c16ddc2
......@@ -571,8 +571,7 @@ gdk_event_copy (const GdkEvent *event)
}
if (gdk_event_is_allocated (event))
_gdk_display_event_data_copy (gdk_screen_get_display (new_private->screen),
event, new_event);
_gdk_display_event_data_copy (gdk_display_get_default (), event, new_event);
return new_event;
}
......@@ -589,8 +588,6 @@ gdk_event_copy (const GdkEvent *event)
void
gdk_event_free (GdkEvent *event)
{
GdkDisplay *display;
g_return_if_fail (event != NULL);
if (event->any.window)
......@@ -642,8 +639,7 @@ gdk_event_free (GdkEvent *event)
break;
}
display = gdk_screen_get_display (gdk_event_get_screen (event));
_gdk_display_event_data_free (display, event);
_gdk_display_event_data_free (gdk_display_get_default (), event);
g_hash_table_remove (event_hash, event);
g_slice_free (GdkEventPrivate, (GdkEventPrivate*) event);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment