[Xcb] defining the color

Peter Harris git at peter.is-a-geek.org
Wed Feb 2 04:46:20 PST 2011


On Wed, Feb 2, 2011 at 3:17 AM, strinter wrote:
> Dear members of the XCB mailing list!
>
> I've got a question related to the definition and usage of colors. What
> I want to do is to try to fill the circle with gray colour. I do the following

>  rep = xcb_alloc_color_reply (c, xcb_alloc_color (c, cmap, 128, 128,
> 128), NULL);

>  values[0]=rep;

Should be values[0]=rep->pixel; and your compiler should have warned
very loudly about the types not matching. "Different levels of
indirection" or similar. (Also, I don't see a free(rep); anywhere.)

Peter Harris


More information about the Xcb mailing list