Use XKB_MOD_INVALID instead of XkbNoModifier

Signed-off-by: Ran Benita <ran234@gmail.com>
master
Ran Benita 2012-08-29 15:17:00 +03:00
parent 300f3fb1e0
commit 41472822b6
5 changed files with 6 additions and 6 deletions

View File

@ -562,7 +562,7 @@ write_compat(struct xkb_keymap *keymap, struct buf *buf)
SIMatchText(interp->match),
VModMaskText(keymap, interp->mods));
if (interp->virtual_mod != XkbNoModifier) {
if (interp->virtual_mod != XKB_MOD_INVALID) {
write_buf(buf, "\t\t\tvirtualModifier= %s;\n",
keymap->vmod_names[interp->virtual_mod]);
}

View File

@ -184,7 +184,7 @@ ModIndexText(xkb_mod_index_t ndx)
if (name)
return name;
if (ndx == XkbNoModifier)
if (ndx == XKB_MOD_INVALID)
return "none";
buf = GetBuffer(32);

View File

@ -253,7 +253,7 @@ InitCompatInfo(CompatInfo *info, struct xkb_keymap *keymap, unsigned file_id,
info->dflt.defined = 0;
info->dflt.merge = MERGE_OVERRIDE;
info->dflt.interp.flags = 0;
info->dflt.interp.virtual_mod = XkbNoModifier;
info->dflt.interp.virtual_mod = XKB_MOD_INVALID;
memset(&info->dflt.interp.act, 0, sizeof(info->dflt.interp.act));
info->dflt.interp.act.type = XkbSA_NoAction;
ClearIndicatorMapInfo(keymap->ctx, &info->ledDflt);
@ -274,7 +274,7 @@ ClearCompatInfo(CompatInfo *info)
info->dflt.defined = 0;
info->dflt.merge = MERGE_AUGMENT;
info->dflt.interp.flags = 0;
info->dflt.interp.virtual_mod = XkbNoModifier;
info->dflt.interp.virtual_mod = XKB_MOD_INVALID;
memset(&info->dflt.interp.act, 0, sizeof(info->dflt.interp.act));
info->dflt.interp.act.type = XkbSA_NoAction;
ClearIndicatorMapInfo(keymap->ctx, &info->ledDflt);

View File

@ -88,7 +88,7 @@ LookupModIndex(struct xkb_context *ctx, const void *priv, xkb_atom_t field,
const char *name = xkb_atom_text(ctx, field);
if (istreq(name, "none")) {
*val_rtrn = XkbNoModifier;
*val_rtrn = XKB_MOD_INVALID;
return true;
}

View File

@ -168,7 +168,7 @@ ApplyInterpsToKey(struct xkb_keymap *keymap, struct xkb_key *key)
if ((group == 0 && level == 0) ||
!(interp->match & XkbSI_LevelOneOnly)) {
if (interp->virtual_mod != XkbNoModifier)
if (interp->virtual_mod != XKB_MOD_INVALID)
vmodmask |= (1 << interp->virtual_mod);
}