How to get the list of open windows from xserver

kender picture kender · Oct 31, 2008 · Viewed 31.2k times · Source

Anyone got an idea how to get from an Xserver the list of all open windows?

Answer

Alnitak picture Alnitak · Oct 31, 2008

From the CLI you can use

xwininfo -tree -root

If you need to do this within your own code then you need to use the XQueryTree function from the Xlib library.