725cccf
From 97b23d4a932a493c5f6dc470925a67ad684e4f0f Mon Sep 17 00:00:00 2001
725cccf
From: Peter Hutterer <peter.hutterer@who-t.net>
725cccf
Date: Fri, 13 Feb 2009 09:56:22 +1000
725cccf
Subject: [PATCH] xkb: Fix wrong colour reference in XKB geometry copying. #20081
725cccf
725cccf
base_color and label_color need to reference the color in the destination, not
725cccf
in the source.
725cccf
725cccf
X.Org Bug 20081 <http://bugs.freedesktop.org/show_bug.cgi?id=20081>
725cccf
725cccf
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
725cccf
Signed-off-by: Daniel Stone <daniel@fooishbar.org>
725cccf
---
725cccf
 xkb/xkbUtils.c |    4 ++--
725cccf
 1 files changed, 2 insertions(+), 2 deletions(-)
725cccf
725cccf
diff --git a/xkb/xkbUtils.c b/xkb/xkbUtils.c
725cccf
index aa63b35..9a1edc9 100644
725cccf
--- a/xkb/xkbUtils.c
725cccf
+++ b/xkb/xkbUtils.c
725cccf
@@ -1955,9 +1955,9 @@ _XkbCopyGeom(XkbDescPtr src, XkbDescPtr dst)
725cccf
 
725cccf
             strcpy(dst->geom->label_font, src->geom->label_font);
725cccf
             i = XkbGeomColorIndex(src->geom, src->geom->label_color);
725cccf
-            dst->geom->label_color = &(src->geom->colors[i]);
725cccf
+            dst->geom->label_color = &(dst->geom->colors[i]);
725cccf
             i = XkbGeomColorIndex(src->geom, src->geom->base_color);
725cccf
-            dst->geom->base_color = &(src->geom->colors[i]);
725cccf
+            dst->geom->base_color = &(dst->geom->colors[i]);
725cccf
         }
725cccf
         else {
725cccf
             if (dst->geom->label_font) {
725cccf
-- 
725cccf
1.6.0.6
725cccf