On Mon, 2014-04-21 at 21:51 -0700, Keith Packard wrote:
> Adam Jackson <[email protected]> writes:
> 
> > Just throw BadPicture instead of crashing.  It's not currently a
> > meaningful thing to do anyway, RenderSetPictureRectangles would error if
> > you tried (which this patch changes to BadPicture as well for
> > consistency).  The problem with trying to do it is if the clip is
> > specified as a pixmap then we try to convert it to a region, and
> > ->BitmapToRegion requires a ScreenPtr, and source-only pictures don't
> > have one.
> 
> And source-only pictures can't get a CT_PIXMAP set -- CPClipMask returns
> BadDrawable when you try to do that on a picture without a drawable.

#include <X11/Xlib.h>
#include <X11/extensions/Xrender.h>
#include <X11/extensions/Xfixes.h>

int main(void)
{
    XRenderColor c = { 0, 0, 0, 0 };
    Display *dpy = XOpenDisplay(NULL);
    Picture p = XRenderCreateSolidFill(dpy, &c);
    XFixesSetPictureClipRegion(dpy, p, 0, 0, None);
    XSync(dpy, 0);
    return 0;
}

- ajax

_______________________________________________
[email protected]: X.Org development
Archives: http://lists.x.org/archives/xorg-devel
Info: http://lists.x.org/mailman/listinfo/xorg-devel

Reply via email to