[mutter/gnome-3-34] x11: Wait till data is flushed before notifying on the pending task



commit c92267feb29e3e77f4d280097fec993e8c3b1fe2
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
    
    (cherry picked from commit 0b21dcfe08c9a3ac137da518d6ef5f3a80528883)

 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 86c54ba11..13f444141 100644
--- a/src/x11/meta-x11-selection-output-stream.c
+++ b/src/x11/meta-x11-selection-output-stream.c
@@ -281,7 +281,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]