Reference

XGetSelectionOwner(3) on Linux

The text ff6357687de3, as Debian 11 (Bullseye) shipped it.

manipulate window selection

XGetSelectionOwner(3) on Linux now