Unfortunately, my question is not as simple as keeping track of two windows created by the same process.
Here is what I have:
- Two users, Jack and Jim are remotely logged in to the same Unix system and run X servers
- Jack runs an application, 'AwesomeApp', that opens a GUI in a X window
- Jim runs another instance of this application, opening his own GUI window
- Now, Jack runs a supervisor application that will communicate with the process owning the first window (eg 'AwesomeApp') because it's HIS instance of 'AwesomeApp'
- How can his instance of the supervisor find which instance of 'AwesomeApp' window is his own?