Not much decent documentation for Xlib.
Has anyone here used it enough to know how to get the current window id? Or any window id? I am guessing I have to get all of them using XQueryTree() and choose.
Is there a better way?
This is a discussion on Basic Xlib question within the Linux Programming forums, part of the Platform Specific Boards category; Not much decent documentation for Xlib. Has anyone here used it enough to know how to get the current window ...
Not much decent documentation for Xlib.
Has anyone here used it enough to know how to get the current window id? Or any window id? I am guessing I have to get all of them using XQueryTree() and choose.
Is there a better way?
C programming resources:
GNU C Function and Macro Index -- glibc reference manual
The C Book -- nice online learner guide
Current ISO draft standard
CCAN -- new CPAN like open source library repository
3 (different) GNU debugger tutorials: #1 -- #2 -- #3
cpwiki -- our wiki on sourceforge
I would have thought the answer to such a basic thing would be...well everywhere and I am not seeing it. Let me dig through my books on X...
Jeff
OK this looks like a long way around the block so to speak but here is a link to a code-fragment that does essentially that. With a little elbow grease it could be bent to your will: Its about a guy trying to externally manipulate open office windows by ID...
Window ID
Cheers.
When you create a window you get its id; you can also easily get the root window id via some macros as this is a particular case; you can get window ids by subscribing to any window-related event (creation, destruction, resizing, etc.). The last method is to walk the window tree as you suggested.