Linux - enumerate X window system - window id
Hello,
I have some problems how to find id of some window in X. I'm lost :\ Can you pick me some books, functions, API's or else how to find window id? The only thing that i want to do is to send a message to some window, but i need to know the id(windows terminology - handle). Thanks in advance... EDIT: To describe best the problem, in MS windows for example there are several ways to get window handle... like FindWindow(...). Wait, wait, wait... yea it's MS, don't blame me. Thats why i want to start exploring Linux dev with few simple tasks so any info is most appreciated. |
How do you wish to specify the window to identify? To click on it?
If so you can use the xwininfo command. This changes the cursor to a cross hairs, and when you click on a window, the program output something like this: Code:
xwininfo: Window id: 0x4000007 "matthew@chubby: ~/bin - Shell - Konsole" Code:
xwininfo |grep 'Window id:' |cut -d" " -f4 |
Really thanks, but is there a way to do it in C/C++ ? Currently im trying to debug panels like XFCE panel and etc. to find out how is it implented there... u know when u click on the title of some window and the window is popping up. So that means it should send to the window id _NET_ACTIVE_WINDOW...
|
I think i found the answer and it is XQueryTree. Thanks again matthewg42. I saw the source of xwininfo and it helped me quite much. Also with this tool you can check if you are on the right way ;)
|
All times are GMT -5. The time now is 09:44 AM. |