Use XKB_MOD_INVALID instead of XkbNoModifier Signed-off-by: Ran Benita <ran234@gmail.com>
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74
diff --git a/src/keymap-dump.c b/src/keymap-dump.c
index 949c595..df1a3c2 100644
--- a/src/keymap-dump.c
+++ b/src/keymap-dump.c
@@ -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]);
}
diff --git a/src/text.c b/src/text.c
index c98b915..12d90c4 100644
--- a/src/text.c
+++ b/src/text.c
@@ -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);
diff --git a/src/xkbcomp/compat.c b/src/xkbcomp/compat.c
index 1919a97..0014029 100644
--- a/src/xkbcomp/compat.c
+++ b/src/xkbcomp/compat.c
@@ -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);
diff --git a/src/xkbcomp/expr.c b/src/xkbcomp/expr.c
index 2def311..a66f119 100644
--- a/src/xkbcomp/expr.c
+++ b/src/xkbcomp/expr.c
@@ -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;
}
diff --git a/src/xkbcomp/keymap.c b/src/xkbcomp/keymap.c
index 3fc8915..5c1de7a 100644
--- a/src/xkbcomp/keymap.c
+++ b/src/xkbcomp/keymap.c
@@ -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);
}