[gtk+/gdk-backend: 53/91] Work around issues with events without screens



commit f183cf851b5851d0b00fd52e1b8efff4c054249b
Author: Matthias Clasen <mclasen redhat com>
Date:   Wed Dec 15 02:37:52 2010 -0500

    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.

 gdk/gdkevents.c |    8 ++------
 1 files changed, 2 insertions(+), 6 deletions(-)
---
diff --git a/gdk/gdkevents.c b/gdk/gdkevents.c
index 1455023..e9995e9 100644
--- a/gdk/gdkevents.c
+++ b/gdk/gdkevents.c
@@ -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);



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]