[clug] Xlib: map window to pid?

Dan Polk polkosity at gmail.com
Mon Jul 14 01:15:17 GMT 2008


Hi,

I have a question about Xlib, and would be very grateful to anyone who cared
to share anything they might know about my question... Its work related, so,
you know, bear that in mind before spending too long in reply ;)

Specifically, I want to retrieve the process id (or name of the executable)
which has created a given window (in practice, this will just be the active
window, which I've obtained using XGetInputFocus()).

I assume there is a way to map a window back to the process which created
it, but I can't figure it.  Again, any help appreciated.  Or even where I
could find a more appropriate list?

Cheers.


More information about the linux mailing list