Reference

XGetSelectionOwner(3) on Linux

The text 7b6755ec6584, as Debian 12 (Bookworm) shipped it.

manipulate window selection

XGetSelectionOwner(3) on Linux now