Reference

XWindowAttributes(3) on Linux

The text 27164c74c3d5, as Debian 10 (Buster) shipped it.

get current window attribute or geometry and current window attributes structure

XWindowAttributes(3) on Linux now