I dug around a bit more and came up with a workaround.

In _get_image_surface() in cairo-xlib-surface.c the code commented
"XXX This can't work." is getting used.  (Not a confidence-inspiring
comment :-).

It looks like the func _cairo_image_surface_create_with_masks() ends
up putting depth==0 in cairo_image_surface_t.  Still dunno if that's
normal, but it seems to get through to the XPutImage and the server
doesn't like it.

As a workaround I changed the code earlier in _get_image_surface()
from

        masks.alpha_mask = 0;
to
        masks.alpha_mask = 0xff;

This is a dirty hack, I guess it hard-codes 8-bit greyscale or
something.  But it has the effect of making the test

        if (_CAIRO_MASK_FORMAT (&masks, &format))

succeed, and the code under that leg using
cairo_image_surface_create_for_data() ends up giving depth==8, which
the server likes.  It makes all the problems I reported go away.

So my guess would be there's something dodgy in the code when an 8-bit
pseudocolor visual is in use, I'd imagine the problems should show up
for anyone with that.


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

Reply via email to