[PATCH] Clip rectangles are not necessarily YSorted

Keith Packard <[email protected]>
Newsgroups gmane.comp.lib.cairo
Message-ID <[email protected]>
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 <[email protected]>
---
 src/cairo-xlib-render-compositor.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

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,
-- 
1.7.7.3

--
cairo mailing list
[email protected]
http://lists.cairographics.org/mailman/listinfo/cairo
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.