PDA

View Full Version : Query other client's window geometry, e.g. Qt equivalent of XQueryTree



wjl
22nd April 2006, 06:13
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!

Chicken Blood Machine
22nd April 2006, 22:54
Yes, this is the only way. Qt cannot help you with this.

wjl
23rd April 2006, 01:02
Yes, this is the only way. Qt cannot help you with this.

That's what I had concluded, but I figured it couldn't hurt to ask in case I'd missed something. =)

Anyway, thanks for the confirmation!