Reference

XGetSelectionOwner(3) on Linux

The text 189bbcf19b1f, as Debian 13 (Trixie) shipped it.

manipulate window selection

XGetSelectionOwner(3) on Linux now