[PATCH] XkbComputeShapeBounds() doesn't know about (0,0) when outline->num_points == 1.

Octavio Alvarez Piza alvarezp at alvarezp.ods.org
Sat Feb 18 15:05:11 PST 2006


This patch should fix a bug in XkbComputeShapeBounds(), which doesn't know it
must take (0, 0) as a point when any outline is defined by only one point.

I found the bug in R6.8.2. It is still present in R7.0.

I haven't tested the patch because of disk space limitations.

Octavio.

--- XKBGeom.c   2005-05-13 15:53:44.000000000 -0700
+++ XKBGeom-fixed.c     2006-02-18 14:02:23.000000000 -0800
@@ -75,6 +75,8 @@
        for (pt=outline->points,p=0;p<outline->num_points;p++,pt++) {
            _XkbCheckBounds(&shape->bounds,pt->x,pt->y);
        }
+       if (outline->num_points==1)
+           _XkbCheckBounds(&shape->bounds,0,0);
     }
     return True;
 }



More information about the xorg mailing list