ProgrammingThis forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
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:
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
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.