From 98b155c80a0e85009d92f1a61e4d963542c1798e Mon Sep 17 00:00:00 2001 From: Daniel Stone Date: Mon, 4 Jun 2012 13:01:33 +0100 Subject: [PATCH] Symbols: Don't include NoSymbols in the map Instead of using NoSymbol in the map, we use num_syms == 0 to signify the non-presence of a symbol. So instead of adding NoSymbol mappings to the list regardless, detect them and set num_syms == 0. Signed-off-by: Daniel Stone --- src/xkbcomp/symbols.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/xkbcomp/symbols.c b/src/xkbcomp/symbols.c index 6e7ef40..dce840b 100644 --- a/src/xkbcomp/symbols.c +++ b/src/xkbcomp/symbols.c @@ -1071,6 +1071,11 @@ AddSymbolsToKey(KeyInfo *key, struct xkb_keymap *keymap, key->symsMapNumEntries[ndx][i] = 0; break; } + if (key->symsMapNumEntries[ndx][i] == 1 && + key->syms[ndx][key->symsMapIndex[ndx][i] + j] == XKB_KEY_NoSymbol) { + key->symsMapIndex[ndx][i] = -1; + key->symsMapNumEntries[ndx][i] = 0; + } } } for (j = key->numLevels[ndx] - 1; -- 2.7.4