[mutter/wip/carlosg/incr-is-fubar: 11/11] x11: Fix iterative INCR property checks
- From: Carlos Garnacho <carlosg src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [mutter/wip/carlosg/incr-is-fubar: 11/11] x11: Fix iterative INCR property checks
- Date: Sat, 11 Apr 2020 19:35:55 +0000 (UTC)
commit db1a1a5066d55ddb9a4b23e46709ea708959c044
Author: Carlos Garnacho <carlosg gnome org>
Date: Sat Apr 11 17:21:49 2020 +0200
x11: Fix iterative INCR property checks
It does not make sense to check for the stream not being closed,
this might happen multiple times during the lifetime of the stream
for a single transfer. We want to notify the INCR transfer just
once.
Check for the explicit conditions that we want, that the remaining
data is bigger than we can transfer at once, and that we are not
yet within the INCR transfer.
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 877995ac1..e533f820a 100644
--- a/src/x11/meta-x11-selection-output-stream.c
+++ b/src/x11/meta-x11-selection-output-stream.c
@@ -219,7 +219,7 @@ meta_x11_selection_output_stream_perform_flush (MetaX11SelectionOutputStream *st
if (!priv->incr)
first_chunk = TRUE;
- if (!g_output_stream_is_closing (G_OUTPUT_STREAM (stream)))
+ if (!priv->incr && priv->data->len > max_size)
{
XWindowAttributes attrs;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]