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.
---
 gtk/gio-coroutine.h     | 11 -----------
 gtk/spice-gtk-session.c |  1 -
 2 files changed, 12 deletions(-)

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;
-- 
1.9.0

_______________________________________________
Spice-devel mailing list
Spice-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/spice-devel

Reply via email to