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
This commit is contained in:
Carlos Garnacho 2020-04-11 17:12:18 +02:00 committed by Robert Mader
parent 0b21dcfe08
commit 04d429b743

View File

@ -125,7 +125,12 @@ meta_x11_selection_output_stream_needs_flush_unlocked (MetaX11SelectionOutputStr
meta_x11_selection_output_stream_get_instance_private (stream); meta_x11_selection_output_stream_get_instance_private (stream);
if (priv->data->len == 0) 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))) if (g_output_stream_is_closing (G_OUTPUT_STREAM (stream)))
return TRUE; return TRUE;