[Xcb] Problem with XCBImagePut

Orhun Birsoy obirsoy at comcast.net
Mon Jun 5 18:51:37 PDT 2006


Hi,

I am trying to learn XCB, and I am having problems.

First of all, I don't know XLib either, so if this is a bad idea let me 
know.

Lets start from the easy ones..
. Problem 1
XCB lacks the tutorials I need. So I am planning to follow XLib 
tutorials. Is this a bad idea? What do you suggest? Should I learn (and 
possibly master) XLib before tackling XCB?

. Problem 2
I am developing in C++ and I had to include XCB headers like this
<code>
#include <X11/XCB/xcb.h>
extern "C"
{
   #include <X11/XCB/xcb_aux.h>
   #include <X11/XCB/xcb_icccm.h>
   #include <X11/XCB/xcb_image.h>
}
</code>
I think extern "C" should be added to util headers as well.

.Problem 3
XCBImagePut documents that it returns 1 if no problems occurs. But 
according to the code (if I read it correctly), it always returns 0.

And finally the big one:
.Problem 4
I am having problems when I resize my window greater than a certain 
size. XCBPollForEvent returns NULL and error parameter is -1. I copy an 
image(XCBImage) to a window using XCBImagePut. But everything seems to 
work if use to copy the image in parts instead of in one call using 
XCBPutImage (not XCBImagePut).

Something similar also happens in test_xcb_image when I change W_W and 
W_H defines to 1100. The only difference is test_xcb_image seg faults 
because XCBImageGet returns null.

I don't like attaching code to mailing lists, but I am at a complete 
lost, so here it is.

Thanks
Orhun Birsoy

-------------- next part --------------
A non-text attachment was scrubbed...
Name: main_agg2.cpp
Type: text/x-c++src
Size: 4734 bytes
Desc: not available
Url : http://lists.freedesktop.org/archives/xcb/attachments/20060605/59bf658e/main_agg2.cpp


More information about the Xcb mailing list