Be more strict in ignoring ineffective modifiers

After my recent fix for this, nautilus was still having problems
telling keeping F10 and Shift-F10 apart. With this change, we are
treating levels with the same symbol like inactive levels, ignoring
them entirely.
This commit is contained in:
Matthias Clasen 2012-09-09 18:28:48 -04:00
parent 1c9f52038b
commit eb9223c008

View File

@ -1113,7 +1113,7 @@ MyEnhancedXkbTranslateKeyCode(register XkbDescPtr xkb,
int found = 0;
for (i=0,entry=type->map;i<type->map_count;i++,entry++) {
if (!entry->active)
if (!entry->active || syms[col+entry->level] == syms[col])
continue;
if (mods_rtrn) {
int bits = 0;
@ -1130,7 +1130,7 @@ MyEnhancedXkbTranslateKeyCode(register XkbDescPtr xkb,
* and F10 anymore). And don't add modifiers that are
* explicitly marked as preserved, either.
*/
if ((bits == 1 && syms[col+entry->level] != syms[col]) ||
if (bits == 1 ||
(mods&type->mods.mask) == entry->mods.mask)
{
if (type->preserve)
@ -1140,7 +1140,7 @@ MyEnhancedXkbTranslateKeyCode(register XkbDescPtr xkb,
}
}
if (!found&&((mods&type->mods.mask)==entry->mods.mask)) {
if (!found && ((mods&type->mods.mask) == entry->mods.mask)) {
col+= entry->level;
if (type->preserve)
preserve= type->preserve[i].mask;