4.1 Obtaining Window Information

Xlib provides functions that you can use to obtain information about the window tree, the window's current attributes, the window's current geometry, or the current pointer coordinates. Because they are most frequently used by window managers, these functions all return a status to indicate whether the window still exists.

To obtain the parent, a list of children, and number of children for a given window, use XQueryTree().

To obtain the current attributes of a given window, use XGetWindowAttributes().

To obtain the current geometry of a given drawable, use XGetGeometry().

Next: Translating Screen Coordinates

Christophe Tronche, ch@tronche.com