Use 1 instead of 0 for width and height to avoid BadValue errors from XCreatePixmap.

This commit is contained in:
Carl Worth 2005-04-27 14:09:41 +00:00
parent 2f5b0808b8
commit f3bc5e5554
2 changed files with 11 additions and 0 deletions

View file

@ -1,3 +1,9 @@
2005-04-27 Carl Worth <cworth@cworth.org>
* 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 <cworth@cworth.org>
* test/.cvsignore:

View file

@ -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));