Remove xkb_kt_map_entry::active

Takes the advice of acdad6058d and removes
this field, since its not used anymore now.

Signed-off-by: Ran Benita <ran234@gmail.com>
master
Ran Benita 2012-07-13 17:37:31 +03:00
parent 3e65531f13
commit 0aaa84d8f1
3 changed files with 1 additions and 16 deletions

View File

@ -29,7 +29,6 @@ THE USE OR PERFORMANCE OF THIS SOFTWARE.
static struct xkb_kt_map_entry map2Level[]= {
{
.active = true,
.level = ShiftMask,
.mods = {.mask = 1, .vmods = ShiftMask, .real_mods = 0 }
}
@ -37,12 +36,10 @@ static struct xkb_kt_map_entry map2Level[]= {
static struct xkb_kt_map_entry mapAlpha[]= {
{
.active = true,
.level = ShiftMask,
.mods = { .mask = 1, .vmods = ShiftMask, .real_mods = 0 }
},
{
.active = true,
.level = LockMask,
.mods = { .mask = 0, .vmods = LockMask, .real_mods = 0 }
}
@ -56,12 +53,10 @@ static struct xkb_mods preAlpha[]= {
#define NL_VMOD_MASK 0
static struct xkb_kt_map_entry mapKeypad[]= {
{
.active = true,
.level = ShiftMask,
.mods = { .mask = 1, .vmods = ShiftMask, .real_mods = 0 }
},
{
.active = false,
.level = 0,
.mods = { .mask = 1, .vmods = 0, .real_mods = NL_VMOD_MASK }
}
@ -148,14 +143,12 @@ XkbcInitCanonicalKeyTypes(struct xkb_keymap *keymap, unsigned which,
type->mods.vmods = (1 << keypadVMod);
entry = &darray_item(type->map, 0);
entry->active = true;
entry->mods.mask = ShiftMask;
entry->mods.real_mods = ShiftMask;
entry->mods.vmods = 0;
entry->level = 1;
entry = &darray_item(type->map, 1);
entry->active = false;
entry->mods.mask = 0;
entry->mods.real_mods = 0;
entry->mods.vmods = (1 << keypadVMod);

View File

@ -238,7 +238,6 @@ struct xkb_mods {
};
struct xkb_kt_map_entry {
int active;
uint16_t level;
struct xkb_mods mods;
};

View File

@ -560,10 +560,6 @@ AddMapEntry(struct xkb_keymap *keymap, KeyTypeInfo *type,
return false; /* allocation failure, already reported */
if (new->level >= type->numLevels)
type->numLevels = new->level + 1;
if (new->mods.vmods == 0)
old->active = true;
else
old->active = false;
old->mods.mask = new->mods.real_mods;
old->mods.real_mods = new->mods.real_mods;
old->mods.vmods = new->mods.vmods;
@ -1000,12 +996,9 @@ ComputeEffectiveMap(struct xkb_keymap *keymap, struct xkb_key_type *type)
tmp = 0;
if (entry->mods.vmods != 0) {
tmp = VModsToReal(keymap, entry->mods.vmods);
if (tmp == 0) {
entry->active = false;
if (tmp == 0)
continue;
}
}
entry->active = true;
entry->mods.mask = (entry->mods.real_mods | tmp) & type->mods.mask;
}
}