aboutsummaryrefslogtreecommitdiff
path: root/xkbcomp/compat.c
diff options
context:
space:
mode:
Diffstat (limited to 'xkbcomp/compat.c')
-rw-r--r--xkbcomp/compat.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/xkbcomp/compat.c b/xkbcomp/compat.c
index 759535a38..2b0014244 100644
--- a/xkbcomp/compat.c
+++ b/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);
}