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

(cherry picked from commit d2c762cc66)
This commit is contained in:
Carlos Garnacho 2020-04-11 17:13:52 +02:00 committed by Robert Mader
parent bb831f04c5
commit 7cc5ed96fc

View File

@ -247,9 +247,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,
@ -264,7 +268,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);