diff options
author | Carl Worth <cworth@cworth.org> | 2005-09-19 17:27:22 +0000 |
---|---|---|
committer | Carl Worth <cworth@cworth.org> | 2005-09-19 17:27:22 +0000 |
commit | e54787b78d414d1f0ec5c139ac3c29904a5e3610 (patch) | |
tree | 209d7f111698578e3cf3fbf4ea8a6ed5998f7a02 | |
parent | e39b2391717a04ccaab3367450bb01c2722736cc (diff) |
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.
-rw-r--r-- | ChangeLog | 11 | ||||
-rw-r--r-- | src/cairo-xlib-surface.c | 3 | ||||
-rw-r--r-- | test/Makefile.am | 1 | ||||
-rw-r--r-- | test/clip-all.c | 3 |
4 files changed, 14 insertions, 4 deletions
@@ -1,5 +1,16 @@ 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> * src/cairoint.h : win32 specific definitions for 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); } |