Hi folks,

I'm working on some Free Software programs that do interesting screen tricks (think xroach, xsnow, xneko, amor, stuff like that). I'm using Qt, but don't want a KDE dependency. I would like it to be portable to all Qt platforms if possible.

Is there any way, using just Qt, to query the geometry of other client's windows? Basically, I need to be able to find out the current state of the screen, i.e. where all windows are located, their size, their stacking order (if possible), and so forth.

Since this is Free Software, I'm primarily concerned with X11, but I would prefer to do this in a portable manner just using Qt, so I'm looking for e.g. at Qt equivalent of XQueryTree.

Looking at some Qt programs that do similar things (e.g. some KDE programs like amor) but so far all I've seen is programs falling back to native X11 calls. Is this really the only way?

Anyway, if you can help, that would be excellent!