diff options
author | Paolo Borelli <pborelli@gnome.org> | 2016-02-29 20:59:36 +0100 |
---|---|---|
committer | Paolo Borelli <pborelli@gnome.org> | 2016-02-29 21:53:58 +0100 |
commit | 4a6f8a065abace71c0ca32d959ec9b86628bffaa (patch) | |
tree | c29bce8ff71d34f89882ddba3bdf267c91209e1a /gdk/broadway | |
parent | d000b212c6baeb2b85a9dd75266af0c02a2efb27 (diff) | |
download | gtk+-4a6f8a065abace71c0ca32d959ec9b86628bffaa.tar.gz |
gdk: remove the display->list_devices vfunc
gdk_display_list_devices is deprecated and all the backends
implement the same fallback by delegating to the device manager
and caching the list (caching it is needed since the method does
not transfer ownership of the container).
The compat code can be shared among all backends and we can
initialize the list lazily only in the case someone calls the
deprecated method.
https://bugzilla.gnome.org/show_bug.cgi?id=762891
Diffstat (limited to 'gdk/broadway')
-rw-r--r-- | gdk/broadway/gdkdisplay-broadway.c | 50 | ||||
-rw-r--r-- | gdk/broadway/gdkdisplay-broadway.h | 4 |
2 files changed, 0 insertions, 54 deletions
diff --git a/gdk/broadway/gdkdisplay-broadway.c b/gdk/broadway/gdkdisplay-broadway.c index c5f64286e2..2aa56c6a9d 100644 --- a/gdk/broadway/gdkdisplay-broadway.c +++ b/gdk/broadway/gdkdisplay-broadway.c @@ -66,42 +66,6 @@ gdk_event_init (GdkDisplay *display) broadway_display->event_source = _gdk_broadway_event_source_new (display); } -static void -gdk_broadway_display_init_input (GdkDisplay *display) -{ - GdkBroadwayDisplay *broadway_display; - GdkDeviceManager *device_manager; - GdkDevice *device; - GList *list, *l; - - broadway_display = GDK_BROADWAY_DISPLAY (display); - G_GNUC_BEGIN_IGNORE_DEPRECATIONS; - device_manager = gdk_display_get_device_manager (display); - - /* For backwards compatibility, just add - * floating devices that are not keyboards. - */ - list = gdk_device_manager_list_devices (device_manager, GDK_DEVICE_TYPE_FLOATING); - - for (l = list; l; l = l->next) - { - device = l->data; - - if (gdk_device_get_source (device) == GDK_SOURCE_KEYBOARD) - continue; - - broadway_display->input_devices = g_list_prepend (broadway_display->input_devices, - g_object_ref (l->data)); - } - - g_list_free (list); - - /* Add the core pointer to the devices list */ - broadway_display->input_devices = g_list_prepend (broadway_display->input_devices, - g_object_ref (GDK_BROADWAY_DEVICE_MANAGER (device_manager)->core_pointer)); - G_GNUC_END_IGNORE_DEPRECATIONS; -} - GdkDisplay * _gdk_broadway_display_open (const gchar *display_name) { @@ -128,7 +92,6 @@ _gdk_broadway_display_open (const gchar *display_name) gdk_event_init (display); - gdk_broadway_display_init_input (display); _gdk_broadway_display_init_dnd (display); _gdk_broadway_screen_setup (broadway_display->screens[0]); @@ -210,8 +173,6 @@ gdk_broadway_display_dispose (GObject *object) { GdkBroadwayDisplay *broadway_display = GDK_BROADWAY_DISPLAY (object); - g_list_foreach (broadway_display->input_devices, (GFunc) g_object_run_dispose, NULL); - _gdk_screen_close (broadway_display->screens[0]); if (broadway_display->event_source) @@ -235,8 +196,6 @@ gdk_broadway_display_finalize (GObject *object) _gdk_broadway_cursor_display_finalize (GDK_DISPLAY_OBJECT(broadway_display)); - /* input GdkDevice list */ - g_list_free_full (broadway_display->input_devices, g_object_unref); /* Free all GdkScreens */ g_object_unref (broadway_display->screens[0]); g_free (broadway_display->screens); @@ -297,14 +256,6 @@ gdk_broadway_display_supports_composite (GdkDisplay *display) return FALSE; } -static GList * -gdk_broadway_display_list_devices (GdkDisplay *display) -{ - g_return_val_if_fail (GDK_IS_DISPLAY (display), NULL); - - return GDK_BROADWAY_DISPLAY (display)->input_devices; -} - static gulong gdk_broadway_display_get_next_serial (GdkDisplay *display) { @@ -356,7 +307,6 @@ gdk_broadway_display_class_init (GdkBroadwayDisplayClass * class) display_class->supports_shapes = gdk_broadway_display_supports_shapes; display_class->supports_input_shapes = gdk_broadway_display_supports_input_shapes; display_class->supports_composite = gdk_broadway_display_supports_composite; - display_class->list_devices = gdk_broadway_display_list_devices; display_class->get_cursor_for_type = _gdk_broadway_display_get_cursor_for_type; display_class->get_cursor_for_name = _gdk_broadway_display_get_cursor_for_name; display_class->get_cursor_for_surface = _gdk_broadway_display_get_cursor_for_surface; diff --git a/gdk/broadway/gdkdisplay-broadway.h b/gdk/broadway/gdkdisplay-broadway.h index 401ac6fa93..fe2080ac70 100644 --- a/gdk/broadway/gdkdisplay-broadway.h +++ b/gdk/broadway/gdkdisplay-broadway.h @@ -50,10 +50,6 @@ struct _GdkBroadwayDisplay /* drag and drop information */ GdkDragContext *current_dest_drag; - /* Input device */ - /* input GdkDevice list */ - GList *input_devices; - /* The offscreen window that has the pointer in it (if any) */ GdkWindow *active_offscreen_window; |