[Xcb] Proting xrestop to XCB

Michaël Lefèvre michael.xorg at gmail.com
Mon Jun 26 14:02:27 PDT 2006


2006/6/26, Vincent Torri <Vincent.Torri at iecn.u-nancy.fr>:
>
>
> Hey :)
>
> maybe look at the tutorial in xcb/doc/tutorial first. You'll learn a bit
> how xcb  works, how to create a connection, a window, and other things.
> There is also a part where you can find translation of usual Xlib
> functions.
>
> hope this helps a bit. Don't hesitate to ask questions here or on irc
> (#xcb on freenode)



Thanks,

then first question :
is there a way of getting the pid of the process owning a defined window
through XCB ?

xrestop use :
<code>
Atom  type;
unsigned long  bytes_after, n_items;
long *data = NULL;
pid_t result = -1;
int   format;

if (XGetWindowProperty (app->connection, win,
               "_NET_WM_PID",
               0, 2L,
               0, XA_CARDINAL,
               &type, &format, &n_items,
               &bytes_after, (unsigned char **)&data) == SUCCESS ....
</code>

Michaël
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.x.org/archives/xorg/attachments/20060626/7f0eb857/attachment.html>


More information about the xorg mailing list