Get an X window ID

eberrocal at eberrocal at
Thu May 17 06:57:56 PDT 2007

> Date: Thu, 17 May 2007 09:19:56 -0300
> From: "Paulo Zanoni" <przanoni at>
> Subject: Re: Get an X window ID
> To: xorg at
> Message-ID:
> 	<8944b160705170519x48073769k4fb0cb403a662a2c at>
> Content-Type: text/plain; charset=ISO-8859-1; format=flowed
> You could try xwininfo.

Thanks but, this program do not allow me to get the window ID (Window)
with the process ID.

I can see in the code that I can know the window id with the window name,
and this works fine, but the problem is that normally my program do not
know the name of the window that he is lunching, the only thing that my
program knows is the process ID.

I expect that my English have not been very bad.

thanks for your time.


> 2007/5/17, eberrocal at
> <eberrocal at>:
>> My problem is that I need to know the ID of an X window.
>> I have a program that lunch other program with the typical fork() and
>> after execl().
>> I have the ID of the process but I need the ID of the window because I
>> need to send X events to this window.
>> There are any form to get the window ID of a program (of what I have his
>> process ID) ??:
>> Thanks for your time.
>> Edu.
>> _______________________________________________
>> xorg mailing list
>> xorg at

More information about the xorg mailing list