summaryrefslogtreecommitdiff
path: root/app/xkbcomp/compat.c
diff options
context:
space:
mode:
authorMatthieu Herrb <matthieu@cvs.openbsd.org>2012-05-15 06:11:33 +0000
committerMatthieu Herrb <matthieu@cvs.openbsd.org>2012-05-15 06:11:33 +0000
commit676fa23e3c5ddf19cef1f95ba5a59f47c3fc3738 (patch)
treeac546aee33f6a7b0c55e7ad7cee1eebcd9b419d4 /app/xkbcomp/compat.c
parent96294d9b335dc8468dcd1f08f925f55ddcd6c2ba (diff)
Update to xkbcomp 1.2.4
Diffstat (limited to 'app/xkbcomp/compat.c')
-rw-r--r--app/xkbcomp/compat.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/app/xkbcomp/compat.c b/app/xkbcomp/compat.c
index 759535a38..2b0014244 100644
--- a/app/xkbcomp/compat.c
+++ b/app/xkbcomp/compat.c
@@ -50,6 +50,7 @@ typedef struct _GroupCompatInfo
{
unsigned char fileID;
unsigned char merge;
+ Bool defined;
unsigned char real_mods;
unsigned short vmods;
} GroupCompatInfo;
@@ -280,8 +281,8 @@ AddGroupCompat(CompatInfo * info, unsigned group, GroupCompatInfo * newGC)
ACTION1("Using %s definition\n",
(merge == MergeAugment ? "old" : "new"));
}
- if (merge != MergeAugment)
- *gc = *newGC;
+ if(newGC->defined && (merge != MergeAugment || !gc->defined))
+ *gc = *newGC;
return True;
}
@@ -715,6 +716,7 @@ HandleGroupCompatDef(GroupCompatDef * def,
}
tmp.real_mods = val.uval & 0xff;
tmp.vmods = (val.uval >> 8) & 0xffff;
+ tmp.defined = True;
return AddGroupCompat(info, def->group - 1, &tmp);
}