[mutter/wip/carlosg/incr-is-fubar: 14/18] x11: Don't invariably queue a pending delete request
- From: Carlos Garnacho <carlosg src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [mutter/wip/carlosg/incr-is-fubar: 14/18] x11: Don't invariably queue a pending delete request
- Date: Tue, 14 Apr 2020 14:10:37 +0000 (UTC)
commit 4f490361f1a60af34cea0eb645ad8ff05d6a0134
Author: Carlos Garnacho <carlosg gnome org>
Date: Sat Apr 11 17:13:52 2020 +0200
x11: Don't invariably queue a pending delete request
We don't need doing this roundtrip for non-INCR transfers.
https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1198
src/x11/meta-x11-selection-output-stream.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
---
diff --git a/src/x11/meta-x11-selection-output-stream.c b/src/x11/meta-x11-selection-output-stream.c
index c6df055b4..4cdde8ab3 100644
--- a/src/x11/meta-x11-selection-output-stream.c
+++ b/src/x11/meta-x11-selection-output-stream.c
@@ -243,9 +243,13 @@ meta_x11_selection_output_stream_perform_flush (MetaX11SelectionOutputStream *st
PropModeReplace,
(guchar *) &(long) { n_elements },
1);
+ priv->delete_pending = TRUE;
}
else
{
+ if (priv->incr && priv->data->len > 0)
+ priv->delete_pending = TRUE;
+
XChangeProperty (xdisplay,
priv->xwindow,
priv->xproperty,
@@ -260,7 +264,6 @@ meta_x11_selection_output_stream_perform_flush (MetaX11SelectionOutputStream *st
if (first_chunk)
meta_x11_selection_output_stream_notify_selection (stream);
- priv->delete_pending = TRUE;
g_cond_broadcast (&priv->cond);
g_mutex_unlock (&priv->mutex);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]