GNOME Bugzilla – Bug 762891
gdk: remove the display->list_devices vfunc
Last modified: 2016-02-29 20:58:51 UTC
This function is implemented only for backward compat and the code is the same on all backends (well, wayland was even simpler but I guess that is just a bug/limitation). I can only test on x11 and win32, but the patch is pretty mechanic.
Created attachment 322702 [details] [review] 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.
Review of attachment 322702 [details] [review]: ::: gdk/gdkdisplay.c @@ +1862,3 @@ + * floating devices that are not keyboards. + */ + list = gdk_device_manager_list_devices (device_manager, GDK_DEVICE_TYPE_FLOATING); Can't you use GdkSeat here ?
I can look (In reply to Matthias Clasen from comment #2) > Can't you use GdkSeat here ? Probably yes, I am not familiar with the new seat stuff... I'd rather commit this with the same code that was there before and then convert to GdkSeat in a follow up patch
(In reply to Paolo Borelli from comment #3) > I can look (In reply to Matthias Clasen from comment #2) > > Can't you use GdkSeat here ? > > Probably yes, I am not familiar with the new seat stuff... I'd rather commit > this with the same code that was there before and then convert to GdkSeat in > a follow up patch Fine with me
Review of attachment 322702 [details] [review]: .
Review of attachment 322702 [details] [review]: ::: gdk/win32/gdkdisplay-win32.c @@ +238,3 @@ + + display->device_manager = g_object_new (GDK_TYPE_DEVICE_MANAGER_WIN32, + "display", display, wrong indent?
pushed (including nacho's nitpick) along with a follow up patch to port to GtkSeat