[cairo-commit] cairo/src cairo-xlib-surface.c,1.118.2.1,1.118.2.2

Carl Worth commit at pdx.freedesktop.org
Mon Sep 19 17:27:24 PDT 2005


Committed by: cworth

Update of /cvs/cairo/cairo/src
In directory gabe:/tmp/cvs-serv11122/src

Modified Files:
      Tag: BRANCH_1_0
	cairo-xlib-surface.c 
Log Message:

2005-09-19  Carl Worth  <cworth at 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.


Index: cairo-xlib-surface.c
===================================================================
RCS file: /cvs/cairo/cairo/src/cairo-xlib-surface.c,v
retrieving revision 1.118.2.1
retrieving revision 1.118.2.2
diff -u -d -r1.118.2.1 -r1.118.2.2
--- cairo-xlib-surface.c	31 Aug 2005 22:09:43 -0000	1.118.2.1
+++ cairo-xlib-surface.c	20 Sep 2005 00:27:22 -0000	1.118.2.2
@@ -1352,7 +1352,8 @@
     unsigned long mask = 0;
 
     Pixmap pixmap = XCreatePixmap (surface->dpy, surface->drawable,
-				   width, height,
+				   width <= 0 ? 1 : width,
+				   height <= 0 ? 1 : height,
 				   8);
     Picture picture;
 



More information about the cairo-commit mailing list