Reference

XIGetFocus(3) on Linux

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

set or get the device's focus.

XIGetFocus(3) on Linux now