[mutter/wip/carlosg/incr-is-fubar: 12/18] x11: Wait till data is flushed before notifying on the pending task



commit 0ef3dab626190d74273936a13d686fe922f78101
Author: Carlos Garnacho <carlosg gnome org>
Date:   Sat Apr 11 17:09:23 2020 +0200

    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;
 


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]