title: How to convert a X11 window id to a process id
body: <p>I'm working on a small application and I need to find the PID of a process given the X11 window ID of its main window or child windows. I saw examples for doing such a conversion using <code>_NET_WM_PID</code>, but I cannot figure out how to do it without using it. The reason for not using <code>_NET_WM_PID</code> is that  it's not implemented in all the available window managers and my application needs to work on any one of them (or at least on most of them). Could somebody help me please and give me some suggestion/directions on how to solve this issue? Thank you!</p>