From 0b21dcfe08c9a3ac137da518d6ef5f3a80528883 Mon Sep 17 00:00:00 2001 From: Carlos Garnacho Date: Sat, 11 Apr 2020 17:09:23 +0200 Subject: [PATCH] x11: Wait till data is flushed before notifying on the pending task It does not make sense to notify flushes mid-transfer. We should wait till the data is actually finished before notifying on the pending task. https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1198 --- src/x11/meta-x11-selection-output-stream.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/x11/meta-x11-selection-output-stream.c b/src/x11/meta-x11-selection-output-stream.c index f7c27cc09..59ca1d400 100644 --- a/src/x11/meta-x11-selection-output-stream.c +++ b/src/x11/meta-x11-selection-output-stream.c @@ -277,7 +277,7 @@ meta_x11_selection_output_stream_perform_flush (MetaX11SelectionOutputStream *st error_str); g_clear_object (&priv->pending_task); } - else if (priv->pending_task) + else if (priv->pending_task && priv->data->len == 0 && !priv->delete_pending) { size_t result;