diff --git a/gdk/gdkdisplay.c b/gdk/gdkdisplay.c index 321c6cb17e..1dc331e0ed 100644 --- a/gdk/gdkdisplay.c +++ b/gdk/gdkdisplay.c @@ -2502,3 +2502,18 @@ gdk_display_notify_startup_complete (GdkDisplay *display, { GDK_DISPLAY_GET_CLASS (display)->notify_startup_complete (display, startup_id); } + +void +_gdk_display_event_data_copy (GdkDisplay *display, + const GdkEvent *event, + GdkEvent *new_event) +{ + GDK_DISPLAY_GET_CLASS (display)->event_data_copy (display, event, new_event); +} + +void +_gdk_display_event_data_free (GdkDisplay *display, + GdkEvent *event) +{ + GDK_DISPLAY_GET_CLASS (display)->event_data_free (display, event); +} diff --git a/gdk/gdkdisplayprivate.h b/gdk/gdkdisplayprivate.h index 9e8cb4c7c4..92398121f2 100644 --- a/gdk/gdkdisplayprivate.h +++ b/gdk/gdkdisplayprivate.h @@ -177,6 +177,11 @@ struct _GdkDisplayClass void (*notify_startup_complete) (GdkDisplay *display, const gchar *startup_id); + void (*event_data_copy) (GdkDisplay *display, + const GdkEvent *event, + GdkEvent *new_event); + void (*event_data_free) (GdkDisplay *display, + GdkEvent *event); /* Signals */ void (*closed) (GdkDisplay *display, @@ -224,6 +229,11 @@ void _gdk_display_pointer_info_foreach (GdkDisplay *display GdkDisplayPointerInfoForeach func, gpointer user_data); gulong _gdk_display_get_next_serial (GdkDisplay *display); +void _gdk_display_event_data_copy (GdkDisplay *display, + const GdkEvent *event, + GdkEvent *new_event); +void _gdk_display_event_data_free (GdkDisplay *display, + GdkEvent *event); G_END_DECLS diff --git a/gdk/gdkevents.c b/gdk/gdkevents.c index 38c310c83d..1455023844 100644 --- a/gdk/gdkevents.c +++ b/gdk/gdkevents.c @@ -571,8 +571,9 @@ gdk_event_copy (const GdkEvent *event) } if (gdk_event_is_allocated (event)) - _gdk_windowing_event_data_copy (event, new_event); - + _gdk_display_event_data_copy (gdk_screen_get_display (new_private->screen), + event, new_event); + return new_event; } @@ -588,6 +589,8 @@ gdk_event_copy (const GdkEvent *event) void gdk_event_free (GdkEvent *event) { + GdkDisplay *display; + g_return_if_fail (event != NULL); if (event->any.window) @@ -639,7 +642,8 @@ gdk_event_free (GdkEvent *event) break; } - _gdk_windowing_event_data_free (event); + display = gdk_screen_get_display (gdk_event_get_screen (event)); + _gdk_display_event_data_free (display, event); g_hash_table_remove (event_hash, event); g_slice_free (GdkEventPrivate, (GdkEventPrivate*) event); diff --git a/gdk/x11/gdkdisplay-x11.c b/gdk/x11/gdkdisplay-x11.c index 126d0288d0..113d61fe7a 100644 --- a/gdk/x11/gdkdisplay-x11.c +++ b/gdk/x11/gdkdisplay-x11.c @@ -2667,6 +2667,19 @@ gdk_x11_set_sm_client_id (const gchar *sm_client_id) g_slist_free (displays); } +static void +gdk_x11_display_event_data_copy (GdkDisplay *display, + const GdkEvent *src, + GdkEvent *dst) +{ +} + +static void +gdk_x11_display_event_data_free (GdkDisplay *display, + GdkEvent *event) +{ +} + static void _gdk_display_x11_class_init (GdkDisplayX11Class * class) { @@ -2710,5 +2723,7 @@ _gdk_display_x11_class_init (GdkDisplayX11Class * class) display_class->after_process_all_updates = _gdk_x11_display_after_process_all_updates; display_class->get_next_serial = gdk_x11_display_get_next_serial; display_class->notify_startup_complete = gdk_x11_display_notify_startup_complete; + display_class->event_data_copy = gdk_x11_display_event_data_copy; + display_class->event_data_free = gdk_x11_display_event_data_free; } diff --git a/gdk/x11/gdkmain-x11.c b/gdk/x11/gdkmain-x11.c index 6424aab56b..31a08d4b4f 100644 --- a/gdk/x11/gdkmain-x11.c +++ b/gdk/x11/gdkmain-x11.c @@ -595,14 +595,3 @@ gdk_x11_get_default_xdisplay (void) { return GDK_DISPLAY_XDISPLAY (gdk_display_get_default ()); } - -void -_gdk_windowing_event_data_copy (const GdkEvent *src, - GdkEvent *dst) -{ -} - -void -_gdk_windowing_event_data_free (GdkEvent *event) -{ -}