Skip to content

x11: fix deadlock when finalizing output stream

If we have a very large selection (many MB of textbuffer text) we can possibly deadlock here trying to flush as the serializer is disposed and finalized on the main thread.

This avoids it similarly to other places by checking that we are allowed to flush at this point.

Fixes: #3153

Merge request reports