2006/6/26, Vincent Torri &lt;<a href="mailto:Vincent.Torri@iecn.u-nancy.fr">Vincent.Torri@iecn.u-nancy.fr</a>&gt;:<div><span class="gmail_quote"></span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<br>Hey :)<br><br>maybe look at the tutorial in xcb/doc/tutorial first. You'll learn a bit<br>how xcb&nbsp;&nbsp;works, how to create a connection, a window, and other things.<br>There is also a part where you can find translation of usual Xlib
<br>functions.<br><br>hope this helps a bit. Don't hesitate to ask questions here or on irc<br>(#xcb on freenode)</blockquote><div><br><br>Thanks,<br><br>then first question :<br>is there a way of getting the pid of the process owning a defined window through XCB ?
<br><br>xrestop use :<br>&lt;code&gt;<br>Atom&nbsp; type;<br>unsigned long&nbsp; bytes_after, n_items;<br>long *data = NULL;<br>pid_t result = -1;<br>int&nbsp;&nbsp; format;<br><br>if (XGetWindowProperty (app-&gt;connection, win, <br>&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp; &quot;_NET_WM_PID&quot;,
<br>&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp; 0, 2L,<br>&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp; 0, XA_CARDINAL,<br>&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp; &amp;type, &amp;format, &amp;n_items,<br>&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp; &amp;bytes_after, (unsigned char **)&amp;data) == SUCCESS ....<br></div>&lt;/code&gt;<br>
<br>Michaël</div>