I would like to programmatically determine all of the visible windows on the desktop so that i can place my window, if possible, so that it does not cover up other windows.
It is possible to do this using the wnck package (libwnck-3-dev, to be exact) on ubuntu 12.04.
However, in order to actually compile and link in code from wnck, you must define the symbol WNCK_I_KNOW_THIS_IS_UNSTABLE (you get a compile error otherwise).
This makes me think that this interface is not intended to be relied on.
The interface is very good (provides window name, geometry, whether the window is minimized or maximized, and other information) much more easily than raw xlib calls, and i think some information (minimization) is not even available from xlib.
But i would like to use a stable interface, as i don't want to have to reprogram everything a year down the road.
So: thanks in advance for any pointers to a preferred way of getting a list of windows, and determining the geometry (placement) of each, and the minimization state of each.