diff --git a/ChangeLog b/ChangeLog index 79625622c..c0c1c6703 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,14 @@ +2005-09-19 Carl Worth + + * 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 Originally: 2005-09-19 Hans Breuer diff --git a/src/cairo-xlib-surface.c b/src/cairo-xlib-surface.c index e3955ecad..9d1f7199d 100644 --- a/src/cairo-xlib-surface.c +++ b/src/cairo-xlib-surface.c @@ -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; diff --git a/test/Makefile.am b/test/Makefile.am index a92f13745..6f2bbba39 100644 --- a/test/Makefile.am +++ b/test/Makefile.am @@ -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 \ diff --git a/test/clip-all.c b/test/clip-all.c index 428445bcb..0fbcc4ac1 100644 --- a/test/clip-all.c +++ b/test/clip-all.c @@ -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); }