[Xcb] Determining pixel format when xcb_get_image_reply_t.visual = 0

Peter Harris git at peter.is-a-geek.org
Wed Dec 19 08:33:41 PST 2012

On Wed, Dec 19, 2012 at 9:12 AM, Florian Albrechtskirchinger wrote:
> ... But xcb_get_image_reply_t.visual is zero and there's no
> visual by that ID.
> VLC uses xcb_composite_name_window_pixmap(). Could that be the reason why
> the visual ID isn't set?

Yes. Pixmaps don't have visuals, only Windows do.

> How do I determine the pixel format in this case?

You can xcb_get_window_attributes on the Window to retrieve the visual ID.

Peter Harris

More information about the Xcb mailing list