[Xcb] Re: Problem with XCBImagePut

Orhun Birsoy obirsoy at comcast.net
Tue Jun 6 20:47:33 PDT 2006


Jamey Sharp wrote:
> 
> Note that XCBPutImage returns an XCBVoidCookie, and if the `sequence`
> field of that structure is 0 then an error occured while trying to send
> the PutImage request to the server. Checking for this error return may
> help us track down your problem.
> 
  I replaced my call in HandleExpose
<code>
XCBImagePut(gConnection, drawable, gForegroundGContext, gImage, 0, 0, 0, 
0, gImageWidth, gImageHeight);
</code>
with

<code>
XCBVoidCookie result = XCBPutImage(gConnection, gImage->format, 
drawable, gForegroundGContext, gImageWidth, gImageHeight, 0, 0,
0,gImage->depth, gImage->bytes_per_line * gImageHeight,	gImage->data);
</code>

And my application exits with the following output while increasing the 
size of the window. Note that I used XCBPutImage (not XCBImagePut) so I 
guess if there is problem its in XCBPutImage not in image utility.
.
.
.
sequence : 40 with Image size : 987,969
sequence : 42 with Image size : 1002,985
sequence : 44 with Image size : 1017,1002
sequence : 0 with Image size : 1043,1030
pollForEventError : -1


I guess  returning sequence 0 means some kind of request failure. But 
what? How can I determine what is actually failing?

Orhun Birsoy






More information about the Xcb mailing list