[Spice-devel] [client v2 01/10] gtk: Ignore GLib's too-new warnings where we explicitly check its version

Francois Gouget fgouget at codeweavers.com
Fri Oct 21 06:47:11 UTC 2016


On Thu, 20 Oct 2016, Jonathon Jongsma wrote:
[...]
> > @@ -807,9 +810,11 @@ static void clipboard_get(GtkClipboard
> > *clipboard,
> >  
> >      /* apparently, this is needed to avoid dead-lock, from
> >         gtk_dialog_run */
> > +    G_GNUC_BEGIN_IGNORE_DEPRECATIONS
> >      gdk_threads_leave();
> >      g_main_loop_run(ri.loop);
> >      gdk_threads_enter();
> > +    G_GNUC_END_IGNORE_DEPRECATIONS
> 
> As far as I can see, this hunk doesn't have an explicit gtk version
> check around it. Why do you need to disable deprecation warnings here?

Sorry. That hunk should not have been in that patch.

The reason it's needed is that gdk_threads_{enter,leave}() are 
deprecated since 3.6: all GDK and GTK+ calls should be made from the 
main thread. That code is pretty old (91eeacbe 2011-10-04) so I don't 
know if it's really still needed or was a GTK 2 thing.


-- 
Francois Gouget <fgouget at codeweavers.com>              


More information about the Spice-devel mailing list