diff --git a/ChangeLog b/ChangeLog index d072218f9..6dfceb5d7 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2005-04-27 Carl Worth + + * test/cairo-test.c: (set_xlib_target), (cleanup_xlib_target): + Use 1 instead of 0 for width and height to avoid BadValue errors + from XCreatePixmap. + 2005-04-27 Carl Worth * test/.cvsignore: diff --git a/test/cairo-test.c b/test/cairo-test.c index 68a0b854b..fafe93b79 100644 --- a/test/cairo-test.c +++ b/test/cairo-test.c @@ -207,6 +207,11 @@ set_xlib_target (cairo_t *cr, int width, int height, void **closure) *closure = xtc = xmalloc (sizeof (xlib_target_closure_t)); + if (width == 0) + width = 1; + if (height == 0) + height = 1; + xtc->dpy = dpy = XOpenDisplay (0); if (xtc->dpy == NULL) { fprintf (stderr, "Failed to open display: %s\n", XDisplayName(0));