[cairo-commit] src/cairo-xlib-render-compositor.c

Chris Wilson ickle at kemper.freedesktop.org
Tue Dec 6 10:16:27 PST 2011

 src/cairo-xlib-render-compositor.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 950021f8811cfc1f2394c5c5dcaf2371bb4419e7
Author: Keith Packard <keithp at keithp.com>
Date:   Tue Dec 6 09:58:18 2011 -0800

    Clip rectangles are not necessarily YSorted
    None of the cairo clipping computations guarantee that the resulting
    list of rectangles are constructed in any particular order. Promising
    that they are results in an X error (BadMatch) which generally causes
    applications to crash.
    I suspect this may well be implicated in many (many) bug reports about
    applications which use cairo.
    Signed-off-by: Keith Packard <keithp at keithp.com>
    Signed-off-by: Chris Wilson <chris at chris-wilson.co.uk>

diff --git a/src/cairo-xlib-render-compositor.c b/src/cairo-xlib-render-compositor.c
index 6dad822..6ee69e1 100644
--- a/src/cairo-xlib-render-compositor.c
+++ b/src/cairo-xlib-render-compositor.c
@@ -217,7 +217,7 @@ copy_boxes (void *_dst,
 	assert (j == boxes->num_boxes);
-	XSetClipRectangles (dst->dpy, gc, 0, 0, rects, j, YSorted);
+	XSetClipRectangles (dst->dpy, gc, 0, 0, rects, j, Unsorted);
 	XCopyArea (dst->dpy, src->drawable, dst->drawable, gc,
 		   extents->x + dx, extents->y + dy,

More information about the cairo-commit mailing list