[cairo-commit] cairo/test cairo-test.c,1.22,1.23

Carl Worth commit at pdx.freedesktop.org
Wed Apr 27 14:09:43 PDT 2005


Committed by: cworth

Update of /cvs/cairo/cairo/test
In directory gabe:/tmp/cvs-serv22615/test

Modified Files:
	cairo-test.c 
Log Message:

        * 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.


Index: cairo-test.c
===================================================================
RCS file: /cvs/cairo/cairo/test/cairo-test.c,v
retrieving revision 1.22
retrieving revision 1.23
diff -u -d -r1.22 -r1.23
--- cairo-test.c	27 Apr 2005 20:33:25 -0000	1.22
+++ cairo-test.c	27 Apr 2005 21:09:41 -0000	1.23
@@ -207,6 +207,11 @@
 
     *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));




More information about the cairo-commit mailing list