Anyone got an idea how to get from an Xserver the list of all open windows?
+5
A:
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.
Alnitak
2008-10-31 08:57:52
I would mod this up twice if I could!
Ali A
2008-10-31 08:58:44
A:
You can also take a look at the _NET_CLIENT_LIST
value of the root window. This is set by most modern window managers:
xprop -root|grep ^_NET_CLIENT_LIST
That value can easily be obtained programmatically, see your Xlib documentation!
Marten
2009-06-19 13:22:05