Replace 0xff with MOD_REAL_MASK_ALL

To make it easier to see where it's used. The name is just to match
MOD_REAL.

Signed-off-by: Ran Benita <ran234@gmail.com>
master
Ran Benita 2012-10-06 17:53:53 +02:00
parent a1124b5991
commit 6d74e66e3f
5 changed files with 6 additions and 4 deletions

View File

@ -115,6 +115,8 @@ enum mod_type {
MOD_BOTH = (MOD_REAL | MOD_VIRT),
};
#define MOD_REAL_MASK_ALL ((xkb_mod_mask_t) 0x000000ff)
enum xkb_action_type {
ACTION_TYPE_NONE = 0,
ACTION_TYPE_MOD_SET,

View File

@ -244,7 +244,7 @@ ModMaskText(const struct xkb_keymap *keymap, xkb_mod_mask_t mask)
if (mask == 0)
return "none";
if (mask == 0xff)
if (mask == MOD_REAL_MASK_ALL)
return "all";
str = buf;

View File

@ -389,7 +389,7 @@ ResolveStateAndPredicate(ExprDef *expr, enum xkb_match_operation *pred_rtrn,
expr->value.str);
if (pred_txt && istreq(pred_txt, "any")) {
*pred_rtrn = MATCH_ANY;
*mods_rtrn = 0xff;
*mods_rtrn = MOD_REAL_MASK_ALL;
return true;
}
}

View File

@ -103,7 +103,7 @@ LookupModMask(struct xkb_context *ctx, const void *priv, xkb_atom_t field,
str = xkb_atom_text(ctx, field);
if (istreq(str, "all")) {
*val_rtrn = 0xff;
*val_rtrn = MOD_REAL_MASK_ALL;
return true;
}

View File

@ -36,7 +36,7 @@ ComputeEffectiveMask(struct xkb_keymap *keymap, struct xkb_mods *mods)
xkb_mod_index_t i;
/* The effective mask is only real mods for now. */
mods->mask = mods->mods & 0xff;
mods->mask = mods->mods & MOD_REAL_MASK_ALL;
darray_enumerate(i, mod, keymap->mods)
if (mods->mods & (1 << i))