[Xcb] Proting xrestop to XCB
Ian Osgood
iano at quirkster.com
Mon Jun 26 14:49:39 PDT 2006
From: "Michaël Lefèvre" <michael.xorg at gmail.com>
>
>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
Look in X11/XCB/xproto.h for XCBGetProperty() and any other core X requests,
replies, and types.
Look in X11/XCB/xcb_atom.h for XCB's versions of predefined atoms (CARDINAL
instead of XA_CARDINAL).
Look in xcb/xcb-util/property/ for some possibly useful code and utility functions
relating to properties.
Also look in xcb/xcb-demo for other useful code about XCB in general.
Ian
P.S. You need not copy the xorg list. These questions are pretty specific to XCB.
More information about the Xcb
mailing list