[Spice-devel] [client v3 04/10] gdk: Ignore clipboard_get()'s deprecation warnings

Jonathon Jongsma jjongsma at redhat.com
Thu Oct 27 21:03:08 UTC 2016


Acked-by: Jonathon Jongsma <jjongsma at redhat.com>


On Thu, 2016-10-27 at 18:41 +0200, Francois Gouget wrote:
> Its implementation is modeled after gtk_dialog_run() which still uses
> these deprecated thread functions.
> 
> Signed-off-by: Francois Gouget <fgouget at codeweavers.com>
> ---
>  src/spice-gtk-session.c | 8 ++++++--
>  1 file changed, 6 insertions(+), 2 deletions(-)
> 
> diff --git a/src/spice-gtk-session.c b/src/spice-gtk-session.c
> index 7bed005..4be5711 100644
> --- a/src/spice-gtk-session.c
> +++ b/src/spice-gtk-session.c
> @@ -808,11 +808,15 @@ static void clipboard_get(GtkClipboard
> *clipboard,
>          goto cleanup;
>      }
>  
> -    /* apparently, this is needed to avoid dead-lock, from
> -       gtk_dialog_run */
> +    /* This is modeled on the implementation of gtk_dialog_run()
> even though
> +     * these thread functions are deprecated and appears to be
> 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
>  
>  cleanup:
>      g_clear_pointer(&ri.loop, g_main_loop_unref);


More information about the Spice-devel mailing list