[mutter/wip/carlosg/incr-is-fubar: 13/18] x11: Finish INCR transfers properly
- From: Carlos Garnacho <carlosg src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [mutter/wip/carlosg/incr-is-fubar: 13/18] x11: Finish INCR transfers properly
- Date: Tue, 14 Apr 2020 14:10:31 +0000 (UTC)
commit 856bebfced9467722c7f6248dd32b5c7b26c6311
Author: Carlos Garnacho <carlosg gnome org>
Date: Sat Apr 11 17:12:18 2020 +0200
x11: Finish INCR transfers properly
INCR transfers are mandated to finish with a final 0-size XChangeProperty
roundtrip after the final data chunk. Actually honor this and ensure we
iterate just once more for this.
https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1198
src/x11/meta-x11-selection-output-stream.c | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
---
diff --git a/src/x11/meta-x11-selection-output-stream.c b/src/x11/meta-x11-selection-output-stream.c
index 59ca1d400..c6df055b4 100644
--- a/src/x11/meta-x11-selection-output-stream.c
+++ b/src/x11/meta-x11-selection-output-stream.c
@@ -125,7 +125,12 @@ meta_x11_selection_output_stream_needs_flush_unlocked (MetaX11SelectionOutputStr
meta_x11_selection_output_stream_get_instance_private (stream);
if (priv->data->len == 0)
- return FALSE;
+ {
+ if (priv->incr)
+ return g_output_stream_is_closing (G_OUTPUT_STREAM (stream));
+ else
+ return FALSE;
+ }
if (g_output_stream_is_closing (G_OUTPUT_STREAM (stream)))
return TRUE;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]