Reasons for FreePicture to cause "RenderBadPicture"?

Glynn Clements glynn at
Mon Aug 30 01:37:15 PDT 2010

Clemens Eisserer wrote:

> > Pixmaps are reference-counted and the picture takes a reference on the
> > pixmap, so the pixmap can't go away before the picture.
> >
> > However this isn't true for windows, so as soon as the window is
> > destroyed presumably the picture is destroyed as well or becomes
> > invalid.
> Can this be considered as bug?  I just tried the same for GCs and
> XFreeGC doesn't generate any error when the Window has already been
> destroyed.
> Sure there is an implementation detail behind it, but GCs don't show
> the same behavour and the whole thing somehow feels quite inconsistent
> :(

GCs aren't associated with a window. The drawable passed to XCreateGC
is used to specify the screen and depth, but has no significance
beyond that. A GC may be used with any drawable having the correct
screen and depth.

Glynn Clements <glynn at>

More information about the xorg mailing list