From 887b7356c369e58a959b99d88246df8303e34531 Mon Sep 17 00:00:00 2001 From: "Jasper St. Pierre" Date: Mon, 27 Oct 2014 21:47:58 -0700 Subject: [PATCH] gdkdisplay: Provide a default event_data_copy / event_data_free Every single implementation but Quartz is a no-op for this, so just provide it once rather than in every backend. --- gdk/broadway/gdkdisplay-broadway.c | 15 --------------- gdk/gdkdisplay.c | 15 +++++++++++++++ gdk/mir/gdkmirdisplay.c | 17 ----------------- gdk/wayland/gdkdisplay-wayland.c | 15 --------------- gdk/win32/gdkdisplay-win32.c | 15 --------------- gdk/x11/gdkdisplay-x11.c | 15 --------------- 6 files changed, 15 insertions(+), 77 deletions(-) diff --git a/gdk/broadway/gdkdisplay-broadway.c b/gdk/broadway/gdkdisplay-broadway.c index 53c675d326..307728f760 100644 --- a/gdk/broadway/gdkdisplay-broadway.c +++ b/gdk/broadway/gdkdisplay-broadway.c @@ -330,19 +330,6 @@ gdk_broadway_display_get_next_serial (GdkDisplay *display) return _gdk_broadway_server_get_next_serial (broadway_display->server); } -static void -gdk_broadway_display_event_data_copy (GdkDisplay *display, - const GdkEvent *src, - GdkEvent *dst) -{ -} - -static void -gdk_broadway_display_event_data_free (GdkDisplay *display, - GdkEvent *event) -{ -} - void gdk_broadway_display_show_keyboard (GdkBroadwayDisplay *display) { @@ -398,8 +385,6 @@ gdk_broadway_display_class_init (GdkBroadwayDisplayClass * class) display_class->after_process_all_updates = _gdk_broadway_display_after_process_all_updates; display_class->get_next_serial = gdk_broadway_display_get_next_serial; display_class->notify_startup_complete = gdk_broadway_display_notify_startup_complete; - display_class->event_data_copy = gdk_broadway_display_event_data_copy; - display_class->event_data_free = gdk_broadway_display_event_data_free; display_class->create_window_impl = _gdk_broadway_display_create_window_impl; display_class->get_keymap = _gdk_broadway_display_get_keymap; display_class->get_selection_owner = _gdk_broadway_display_get_selection_owner; diff --git a/gdk/gdkdisplay.c b/gdk/gdkdisplay.c index d6fd187692..acbf66fdee 100644 --- a/gdk/gdkdisplay.c +++ b/gdk/gdkdisplay.c @@ -110,6 +110,19 @@ gdk_display_real_opened (GdkDisplay *display) _gdk_display_manager_add_display (gdk_display_manager_get (), display); } +static void +gdk_display_real_event_data_copy (GdkDisplay *display, + const GdkEvent *src, + GdkEvent *dst) +{ +} + +static void +gdk_display_real_event_data_free (GdkDisplay *display, + GdkEvent *dst) +{ +} + static void gdk_display_class_init (GdkDisplayClass *class) { @@ -123,6 +136,8 @@ gdk_display_class_init (GdkDisplayClass *class) class->opened = gdk_display_real_opened; class->make_default = gdk_display_real_make_default; + class->event_data_copy = gdk_display_real_event_data_copy; + class->event_data_free = gdk_display_real_event_data_free; /** * GdkDisplay::opened: diff --git a/gdk/mir/gdkmirdisplay.c b/gdk/mir/gdkmirdisplay.c index 92dfceefd5..d450837d51 100644 --- a/gdk/mir/gdkmirdisplay.c +++ b/gdk/mir/gdkmirdisplay.c @@ -382,21 +382,6 @@ gdk_mir_display_notify_startup_complete (GdkDisplay *display, //g_printerr ("gdk_mir_display_notify_startup_complete\n"); } -static void -gdk_mir_display_event_data_copy (GdkDisplay *display, - const GdkEvent *src, - GdkEvent *dst) -{ - //g_printerr ("gdk_mir_display_event_data_copy\n"); -} - -static void -gdk_mir_display_event_data_free (GdkDisplay *display, - GdkEvent *event) -{ - //g_printerr ("gdk_mir_display_event_data_free\n"); -} - static void gdk_mir_display_create_window_impl (GdkDisplay *display, GdkWindow *window, @@ -556,8 +541,6 @@ gdk_mir_display_class_init (GdkMirDisplayClass *klass) display_class->after_process_all_updates = gdk_mir_display_after_process_all_updates; display_class->get_next_serial = gdk_mir_display_get_next_serial; display_class->notify_startup_complete = gdk_mir_display_notify_startup_complete; - display_class->event_data_copy = gdk_mir_display_event_data_copy; - display_class->event_data_free = gdk_mir_display_event_data_free; display_class->create_window_impl = gdk_mir_display_create_window_impl; display_class->get_keymap = gdk_mir_display_get_keymap; display_class->push_error_trap = gdk_mir_display_push_error_trap; diff --git a/gdk/wayland/gdkdisplay-wayland.c b/gdk/wayland/gdkdisplay-wayland.c index d9fffe44c2..0f367ec0d8 100644 --- a/gdk/wayland/gdkdisplay-wayland.c +++ b/gdk/wayland/gdkdisplay-wayland.c @@ -432,19 +432,6 @@ gdk_wayland_display_notify_startup_complete (GdkDisplay *display, { } -static void -gdk_wayland_display_event_data_copy (GdkDisplay *display, - const GdkEvent *src, - GdkEvent *dst) -{ -} - -static void -gdk_wayland_display_event_data_free (GdkDisplay *display, - GdkEvent *event) -{ -} - static GdkKeymap * _gdk_wayland_display_get_keymap (GdkDisplay *display) { @@ -535,8 +522,6 @@ gdk_wayland_display_class_init (GdkWaylandDisplayClass * class) display_class->after_process_all_updates = gdk_wayland_display_after_process_all_updates; display_class->get_next_serial = gdk_wayland_display_get_next_serial; display_class->notify_startup_complete = gdk_wayland_display_notify_startup_complete; - display_class->event_data_copy = gdk_wayland_display_event_data_copy; - display_class->event_data_free = gdk_wayland_display_event_data_free; display_class->create_window_impl = _gdk_wayland_display_create_window_impl; display_class->get_keymap = _gdk_wayland_display_get_keymap; display_class->push_error_trap = gdk_wayland_display_push_error_trap; diff --git a/gdk/win32/gdkdisplay-win32.c b/gdk/win32/gdkdisplay-win32.c index 2d73c3037f..97d0e3e0fb 100644 --- a/gdk/win32/gdkdisplay-win32.c +++ b/gdk/win32/gdkdisplay-win32.c @@ -600,19 +600,6 @@ gdk_win32_display_notify_startup_complete (GdkDisplay *display, /* nothing */ } static void -gdk_win32_display_event_data_copy (GdkDisplay *display, - const GdkEvent *src, - GdkEvent *dst) -{ - /* nothing */ -} -static void -gdk_win32_display_event_data_free (GdkDisplay *display, - GdkEvent *event) -{ - /* nothing */ -} -static void gdk_win32_display_push_error_trap (GdkDisplay *display) { /* nothing */ @@ -665,8 +652,6 @@ gdk_win32_display_class_init (GdkWin32DisplayClass *klass) display_class->after_process_all_updates = gdk_win32_display_after_process_all_updates; display_class->get_next_serial = gdk_win32_display_get_next_serial; display_class->notify_startup_complete = gdk_win32_display_notify_startup_complete; - display_class->event_data_copy = gdk_win32_display_event_data_copy; - display_class->event_data_free = gdk_win32_display_event_data_free; display_class->create_window_impl = _gdk_win32_display_create_window_impl; display_class->get_keymap = _gdk_win32_display_get_keymap; diff --git a/gdk/x11/gdkdisplay-x11.c b/gdk/x11/gdkdisplay-x11.c index a964e2ae73..be3ec710a6 100644 --- a/gdk/x11/gdkdisplay-x11.c +++ b/gdk/x11/gdkdisplay-x11.c @@ -2810,19 +2810,6 @@ 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 gint pop_error_trap (GdkDisplay *display, gboolean ignored) @@ -2894,8 +2881,6 @@ gdk_x11_display_class_init (GdkX11DisplayClass * 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; display_class->create_window_impl = _gdk_x11_display_create_window_impl; display_class->get_keymap = gdk_x11_display_get_keymap; display_class->push_error_trap = gdk_x11_display_error_trap_push;