xkb: Fix wrong colour reference in XKB geometry copying. #20081

base_color and label_color need to reference the color in the destination, not
in the source.

X.Org Bug 20081 <http://bugs.freedesktop.org/show_bug.cgi?id=20081>

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Signed-off-by: Daniel Stone <daniel@fooishbar.org>
This commit is contained in:
Peter Hutterer 2009-02-13 09:56:22 +10:00
parent a9d7d659a0
commit f5bf1fdaf3

View File

@ -1955,9 +1955,9 @@ _XkbCopyGeom(XkbDescPtr src, XkbDescPtr dst)
strcpy(dst->geom->label_font, src->geom->label_font);
i = XkbGeomColorIndex(src->geom, src->geom->label_color);
dst->geom->label_color = &(src->geom->colors[i]);
dst->geom->label_color = &(dst->geom->colors[i]);
i = XkbGeomColorIndex(src->geom, src->geom->base_color);
dst->geom->base_color = &(src->geom->colors[i]);
dst->geom->base_color = &(dst->geom->colors[i]);
}
else {
if (dst->geom->label_font) {