kbproto unentanglement: XkbSI_AutoRepeat That was the only interp flag, so just turn it into a straight boolean. Signed-off-by: Daniel Stone <daniel@fooishbar.org>
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 75 76 77 78 79 80 81 82 83
diff --git a/src/keymap-dump.c b/src/keymap-dump.c
index 41adf5b..13d0ebf 100644
--- a/src/keymap-dump.c
+++ b/src/keymap-dump.c
@@ -543,7 +543,7 @@ write_compat(struct xkb_keymap *keymap, struct buf *buf)
if (interp->match & MATCH_LEVEL_ONE_ONLY)
write_buf(buf,
"\t\t\tuseModMapMods=level1;\n");
- if (interp->flags & XkbSI_AutoRepeat)
+ if (interp->repeat)
write_buf(buf, "\t\t\trepeat= True;\n");
write_action(keymap, buf, &interp->act, "\t\t\taction= ", ";\n");
diff --git a/src/xkb-priv.h b/src/xkb-priv.h
index 7a69356..d43e43e 100644
--- a/src/xkb-priv.h
+++ b/src/xkb-priv.h
@@ -292,7 +292,7 @@ struct xkb_key_type {
struct xkb_sym_interpret {
xkb_keysym_t sym;
- unsigned char flags;
+ bool repeat;
enum xkb_match_operation match;
uint8_t mods;
xkb_mod_index_t virtual_mod;
diff --git a/src/xkbcomp/compat.c b/src/xkbcomp/compat.c
index cab6b33..f7b7404 100644
--- a/src/xkbcomp/compat.c
+++ b/src/xkbcomp/compat.c
@@ -237,7 +237,7 @@ InitCompatInfo(CompatInfo *info, struct xkb_keymap *keymap, unsigned file_id,
info->dflt.file_id = file_id;
info->dflt.defined = 0;
info->dflt.merge = MERGE_OVERRIDE;
- info->dflt.interp.flags = 0;
+ info->dflt.interp.repeat = false;
info->dflt.interp.virtual_mod = XKB_MOD_INVALID;
memset(&info->dflt.interp.act, 0, sizeof(info->dflt.interp.act));
info->dflt.interp.act.type = ACTION_TYPE_NONE;
@@ -255,7 +255,7 @@ ClearCompatInfo(CompatInfo *info)
info->name = NULL;
info->dflt.defined = 0;
info->dflt.merge = MERGE_AUGMENT;
- info->dflt.interp.flags = 0;
+ info->dflt.interp.repeat = false;
info->dflt.interp.virtual_mod = XKB_MOD_INVALID;
memset(&info->dflt.interp.act, 0, sizeof(info->dflt.interp.act));
info->dflt.interp.act.type = ACTION_TYPE_NONE;
@@ -333,8 +333,7 @@ AddInterp(CompatInfo *info, SymInterpInfo *new)
}
if (UseNewInterpField(SI_FIELD_AUTO_REPEAT, old, new, report,
&collide)) {
- old->interp.flags &= ~XkbSI_AutoRepeat;
- old->interp.flags |= (new->interp.flags & XkbSI_AutoRepeat);
+ old->interp.repeat = new->interp.repeat;
old->defined |= SI_FIELD_AUTO_REPEAT;
}
if (UseNewInterpField(SI_FIELD_LEVEL_ONE_ONLY, old, new, report,
@@ -596,10 +595,7 @@ SetInterpField(CompatInfo *info, SymInterpInfo *si, const char *field,
if (!ExprResolveBoolean(keymap->ctx, value, &set))
return ReportSIBadType(info, si, field, "boolean");
- if (set)
- si->interp.flags |= XkbSI_AutoRepeat;
- else
- si->interp.flags &= ~XkbSI_AutoRepeat;
+ si->interp.repeat = set;
si->defined |= SI_FIELD_AUTO_REPEAT;
}
diff --git a/src/xkbcomp/keymap.c b/src/xkbcomp/keymap.c
index 4bad351..b917d79 100644
--- a/src/xkbcomp/keymap.c
+++ b/src/xkbcomp/keymap.c
@@ -154,7 +154,7 @@ ApplyInterpsToKey(struct xkb_keymap *keymap, struct xkb_key *key)
/* Infer default key behaviours from the base level. */
if (group == 0 && level == 0) {
if (!(key->explicit & XkbExplicitAutoRepeatMask) &&
- (!interp || (interp->flags & XkbSI_AutoRepeat)))
+ (!interp || interp->repeat))
key->repeats = true;
}