Class X11Clipboard

java.lang.Object
limn.backend.lwjgl.transfer.X11Clipboard
All Implemented Interfaces:
NativeClipboard

public final class X11Clipboard extends Object implements NativeClipboard
The X11 clipboard: the CLIPBOARD selection, owned and converted by a hidden window on a connection of our own.

A second connection, and one thread that makes every call on it. GLFW's connection is GLFW's: its event loop reads every event on it, the selection events included, and hands none on. Ours has a thread that waits on the connection and on a pipe that wakes it; the UI thread only queues work and writes a byte. No two threads ever touch one display, so nothing here depends on XInitThreads having been the first Xlib call of the process, which it was not.

What does not fit one request crosses by INCR, both ways. XFixes tells of a new owner, which is when the types are asked for again, so types() never has to ask.

An X error on our display (a requestor that closed mid-transfer) is ignored; one on any other display goes to the handler that was there, as before.