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:
parent
1c9f52038b
commit
eb9223c008
@ -1113,7 +1113,7 @@ MyEnhancedXkbTranslateKeyCode(register XkbDescPtr xkb,
|
|||||||
int found = 0;
|
int found = 0;
|
||||||
|
|
||||||
for (i=0,entry=type->map;i<type->map_count;i++,entry++) {
|
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;
|
continue;
|
||||||
if (mods_rtrn) {
|
if (mods_rtrn) {
|
||||||
int bits = 0;
|
int bits = 0;
|
||||||
@ -1130,7 +1130,7 @@ MyEnhancedXkbTranslateKeyCode(register XkbDescPtr xkb,
|
|||||||
* and F10 anymore). And don't add modifiers that are
|
* and F10 anymore). And don't add modifiers that are
|
||||||
* explicitly marked as preserved, either.
|
* explicitly marked as preserved, either.
|
||||||
*/
|
*/
|
||||||
if ((bits == 1 && syms[col+entry->level] != syms[col]) ||
|
if (bits == 1 ||
|
||||||
(mods&type->mods.mask) == entry->mods.mask)
|
(mods&type->mods.mask) == entry->mods.mask)
|
||||||
{
|
{
|
||||||
if (type->preserve)
|
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;
|
col+= entry->level;
|
||||||
if (type->preserve)
|
if (type->preserve)
|
||||||
preserve= type->preserve[i].mask;
|
preserve= type->preserve[i].mask;
|
||||||
|
Loading…
Reference in New Issue
Block a user