Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Getting window id for certain process id (for sharing the application)

76 views
Skip to first unread message

selva

unread,
Dec 18, 2007, 4:53:46 AM12/18/07
to
Hi all,

My question is very very old. Lot of people may know answer for this.
Still i could find anything useful for my problem.

These are the questions asked by many people but i couldn't find
anything useful in googling.

Is there a way to obtain a list of window-IDs that belong to a certain
process? (ie retrieving window IDs/pointers/whatever by PID numbers).

Can I know in any way to obtain the window id of the top-level window
of a running X-application based on its process id.?

Objective:
To Collect all the window id's for certain process to share those
windows across network. The user input will be PID. I need to find out
the windowid's related to that particular PID.

Please suggest me.

noj...@gate.cpmet.ufpel.tche.br

unread,
Dec 26, 2007, 9:38:13 PM12/26/07
to

You may attempt to combine xlsclients and xprop to query the value of
the _NET_WM_PID property of each top-level window. That could be made
either by means of a shell/perl script or even writing your own
program. You can get the source code of xlsclients and xprop here:

http://webcvs.freedesktop.org/xorg/xc/programs/xlsclients/xlsclients.c

http://webcvs.freedesktop.org/xorg/xc/programs/xprop/xprop.c

Be warned, however, that not all clients will set the _NET_WM_PID
property.

---
Casantos

0 new messages