After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 764964 - Build fails because gdk_display_get_device_manager is deprecated
Build fails because gdk_display_get_device_manager is deprecated
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: gst-devtools
git master
Other Linux
: Normal normal
: 1.9.1
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2016-04-12 19:48 UTC by Alex Băluț
Modified: 2016-04-29 12:58 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Use the new suggested method - which has been added in 3.20! (2.29 KB, patch)
2016-04-12 19:48 UTC, Alex Băluț
none Details | Review
#if GTK_CHECK_VERSION(3,20,0) (1.89 KB, patch)
2016-04-13 19:30 UTC, Alex Băluț
committed Details | Review

Description Alex Băluț 2016-04-12 19:48:20 UTC
Created attachment 325820 [details] [review]
Use the new suggested method - which has been added in 3.20!

make[3]: Entering directory '/home/aleb/dev/pitivi/gst-devtools/validate/plugins/gtk'
  CC       libgstvalidategtk_la-gstvalidategtk.lo
gstvalidategtk.c: In function ‘get_device’:
gstvalidategtk.c:85:3: error: ‘gdk_display_get_device_manager’ is deprecated: Use 'gdk_display_get_default_seat' instead [-Werror=deprecated-declarations]
   dev_manager = gdk_display_get_device_manager (gdk_display_get_default ());
   ^
In file included from /usr/include/gtk-3.0/gdk/gdkscreen.h:32:0,
                 from /usr/include/gtk-3.0/gdk/gdkapplaunchcontext.h:31,
                 from /usr/include/gtk-3.0/gdk/gdk.h:32,
                 from /usr/include/gtk-3.0/gtk/gtk.h:30,
                 from gstvalidategtk.c:31:
/usr/include/gtk-3.0/gdk/gdkdisplay.h:170:20: note: declared here
 GdkDeviceManager * gdk_display_get_device_manager (GdkDisplay *display);
                    ^
gstvalidategtk.c:87:7: error: ‘gdk_device_manager_list_devices’ is deprecated [-Werror=deprecated-declarations]
       gdk_device_manager_list_devices (dev_manager, GDK_DEVICE_TYPE_MASTER);
       ^
In file included from /usr/include/gtk-3.0/gdk/gdkdisplay.h:32:0,
                 from /usr/include/gtk-3.0/gdk/gdkscreen.h:32,
                 from /usr/include/gtk-3.0/gdk/gdkapplaunchcontext.h:31,
                 from /usr/include/gtk-3.0/gdk/gdk.h:32,
                 from /usr/include/gtk-3.0/gtk/gtk.h:30,
                 from gstvalidategtk.c:31:
/usr/include/gtk-3.0/gdk/gdkdevicemanager.h:41:14: note: declared here
 GList *      gdk_device_manager_list_devices       (GdkDeviceManager *device_manager,
              ^
cc1: all warnings being treated as errors
Makefile:603: recipe for target 'libgstvalidategtk_la-gstvalidategtk.lo' failed
make[3]: *** [libgstvalidategtk_la-gstvalidategtk.lo] Error 1
make[3]: Leaving directory '/home/aleb/dev/pitivi/gst-devtools/validate/plugins/gtk'
Comment 1 Sebastian Dröge (slomo) 2016-04-13 06:29:22 UTC
Comment on attachment 325820 [details] [review]
Use the new suggested method - which has been added in 3.20!

This needs to be conditional only if GTK 3.20 is available. That version is very new and we don't really want to depend on that already. Needs some #ifdefs here.
Comment 2 Alex Băluț 2016-04-13 19:30:44 UTC
Created attachment 325882 [details] [review]
#if GTK_CHECK_VERSION(3,20,0)

Done
Comment 3 Thibault Saunier 2016-04-14 01:40:41 UTC
Review of attachment 325882 [details] [review]:

::: validate/plugins/gtk/gstvalidategtk.c
@@ +143,3 @@
     return NULL;
   }
+#if GTK_CHECK_VERSION(3,20,0)

I think that part should rather go into the get_device function
Comment 4 Alex Băluț 2016-04-14 06:38:00 UTC
(In reply to Thibault Saunier from comment #3)
> Review of attachment 325882 [details] [review] [review]:
> 
> ::: validate/plugins/gtk/gstvalidategtk.c
> @@ +143,3 @@
>      return NULL;
>    }
> +#if GTK_CHECK_VERSION(3,20,0)
> 
> I think that part should rather go into the get_device function

The new API can be used to get the master keyboard directly, there is no need for get_device anymore. 

If you insist, either we make get_device less generic and rename it to get_keyboard, or to keep it generic *maybe* we can use https://developer.gnome.org/gdk3/stable/GdkSeat.html#gdk-seat-get-slaves with accepts a GdkSeatCapabilities parameter (instead of GdkInputSource).
Basically:
- gdk_seat_get_slaves does:
  return seat_class->get_slaves (seat, capabilities);
- gdk_seat_get_keyboard does:
   return seat_class->get_master (seat, GDK_SEAT_CAPABILITY_KEYBOARD);