Avoid attempting to create a size-0 Pixmap, (to prevent the associated X error). This actually showed up when the clip region is empty. Thanks to Radek Doulík for the bug report.

Remove clip-all from the XFAIL list since it works now.
This commit is contained in:
Carl Worth 2005-09-19 17:27:22 +00:00
parent e39b239171
commit e54787b78d
4 changed files with 14 additions and 4 deletions

View file

@ -1,3 +1,14 @@
2005-09-19 Carl Worth <cworth@cworth.org>
* src/cairo-xlib-surface.c: (_create_a8_picture): Avoid attempting
to create a size-0 Pixmap, (to prevent the associated X
error). This actually showed up when the clip region is
empty. Thanks to Radek Doulík for the bug report.
* test/Makefile.am:
* test/clip-all.c: (main): Remove clip-all from the XFAIL list
since it works now.
2005-09-19 Carl Worth <cworth@cworth.org>
Originally: 2005-09-19 Hans Breuer <hans@breuer.org>

View file

@ -1352,7 +1352,8 @@ _create_a8_picture (cairo_xlib_surface_t *surface,
unsigned long mask = 0;
Pixmap pixmap = XCreatePixmap (surface->dpy, surface->drawable,
width, height,
width <= 0 ? 1 : width,
height <= 0 ? 1 : height,
8);
Picture picture;

View file

@ -146,7 +146,6 @@ rel-path-ref.png
# provide an explanation for the expected failure.
XFAIL_TESTS = \
a8-mask \
clip-all \
filter-nearest-offset \
pixman-rotate \
self-intersecting \

View file

@ -65,6 +65,5 @@ draw (cairo_t *cr, int width, int height)
int
main (void)
{
return cairo_test_expect_failure (&test, draw,
"Need to avoid trying to create size-0 Pixmaps in cairo-xlib");
return cairo_test (&test, draw);
}