int XGetClientIdentity(Display *dpy, Window w);
XGetClientIdentity - Retrieve identity (PID) of the client which owns the specified window. Zero is returned instead if the client is running remotely.
Although the LSRT X extension is registered, this is only for recognition purposes. The new Xlib function extends the core protocol rather than being implemented as a true extension.
David Ingram <dmi@uk.research.att.com>