15.4 Getting the Window Hierarchy

XQueryTree() lets you get the IDs of the windows in any portion of the window hierarchy with a single call. This is the only way to find out the IDs of windows created by other clients. XQueryTree() gets the root window ID, the parent window ID, and the list of child window IDs given a window. It also returns the number of children.

One possible use of XQueryTree() is to find out whether your application’s top-level window has been reparented by the window manager, and it returns the ID of the new parent.

Get XLIB Programming Manual, Rel. 5, Third Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.