Xid - Pid establishment

Kala B <[email protected]>
Newsgroups gmane.comp.xfree86.devel
Message-ID <[email protected]>
Hi,

I am trying to develop an application, which needs to know the owner (
process id )  of every window that is being created on the system. As,
setting of _NET_WM_PID is not mandated for applications, is there some
other way through which I could get to know the pid of a window?

I am only interested in the scenario, when both the xserver and
xclient are on the same machine, so the XServer uses a Unix domain
socket. So, in this case, the XServer would anyway get to know the pid
of the connecting client by using the SO_PEERCRED option. Can the
xserver propagate the pid of the client ? (Probably by adding another
specific property to every window being created?). Would there be any
issues with this approach.

These are my very very initial thoughts and am also new to X, so
request you all to give me your suggestions.

Thanks a lot
Kala
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.