[Spice-commits] gtk/gio-coroutine.h gtk/spice-gtk-session.c

Marc-André Lureau elmarco at kemper.freedesktop.org
Tue May 20 09:18:08 PDT 2014


 gtk/gio-coroutine.h     |   11 -----------
 gtk/spice-gtk-session.c |    1 -
 2 files changed, 12 deletions(-)

New commits:
commit aea53ec51d1a51c70b6cf07e3a5a4fddd613406f
Author: Marc-André Lureau <marcandre.lureau at redhat.com>
Date:   Tue May 20 16:53:30 2014 +0200

    Revert "clipboard: prevent reentering main loop if main channel is busy"
    
    This change broke primary clipboard copying from remote to client, on win32.
    
    There is a pending ::clipboard-grab emission, so the channel is not
    idle, and it will handle emission and resume in the inner loop without
    issue. We should really handle this situation with care though, and the
    best would be to teach gtk+ to do async clipboard request.
    
    This reverts commit e3efa8cec51045d87a14a7e4f921c24ad5caffb1.

diff --git a/gtk/gio-coroutine.h b/gtk/gio-coroutine.h
index 50c1b7c..1c4094e 100644
--- a/gtk/gio-coroutine.h
+++ b/gtk/gio-coroutine.h
@@ -35,17 +35,6 @@ struct _GCoroutine
     guint condition_id;
 };
 
-static inline gboolean g_coroutine_is_idle(GCoroutine *self)
-{
-    gboolean idle;
-
-    g_return_val_if_fail(self != NULL, FALSE);
-
-    idle = self->wait_id != 0 || self->condition_id != 0;
-
-    return idle;
-}
-
 /*
  * A special GSource impl which allows us to wait on a certain
  * condition to be satisfied. This is effectively a boolean test
diff --git a/gtk/spice-gtk-session.c b/gtk/spice-gtk-session.c
index cf22905..db5c53c 100644
--- a/gtk/spice-gtk-session.c
+++ b/gtk/spice-gtk-session.c
@@ -721,7 +721,6 @@ static void clipboard_get(GtkClipboard *clipboard,
     g_return_if_fail(selection != -1);
     g_return_if_fail(info < SPICE_N_ELEMENTS(atom2agent));
     g_return_if_fail(s->main != NULL);
-    g_return_if_fail(g_coroutine_is_idle(&SPICE_CHANNEL(s->main)->priv->coroutine));
 
     ri.selection_data = selection_data;
     ri.info = info;


More information about the Spice-commits mailing list