compat: ignore "locking" field in sym interprets This field is used in conjunction with key behaviors, which we don't support since c1ea23da5. This is also unused in xkeyboard-config. 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 75 76 77 78 79 80 81 82 83 84
diff --git a/src/keymap-dump.c b/src/keymap-dump.c
index f406f31..897bf21 100644
--- a/src/keymap-dump.c
+++ b/src/keymap-dump.c
@@ -548,7 +548,6 @@ write_compat(struct xkb_keymap *keymap, struct buf *buf)
write_buf(buf, "\t\tinterpret.useModMapMods= AnyLevel;\n");
write_buf(buf, "\t\tinterpret.repeat= False;\n");
- write_buf(buf, "\t\tinterpret.locking= False;\n");
darray_foreach(interp, keymap->sym_interpret) {
char keysym_name[64];
@@ -571,8 +570,6 @@ write_compat(struct xkb_keymap *keymap, struct buf *buf)
if (interp->match & XkbSI_LevelOneOnly)
write_buf(buf,
"\t\t\tuseModMapMods=level1;\n");
- if (interp->flags & XkbSI_LockingKey)
- write_buf(buf, "\t\t\tlocking= True;\n");
if (interp->flags & XkbSI_AutoRepeat)
write_buf(buf, "\t\t\trepeat= True;\n");
diff --git a/src/xkbcomp/compat.c b/src/xkbcomp/compat.c
index 7779bf0..2164377 100644
--- a/src/xkbcomp/compat.c
+++ b/src/xkbcomp/compat.c
@@ -139,8 +139,7 @@ enum si_field {
SI_FIELD_VIRTUAL_MOD = (1 << 0),
SI_FIELD_ACTION = (1 << 1),
SI_FIELD_AUTO_REPEAT = (1 << 2),
- SI_FIELD_LOCKING_KEY = (1 << 3),
- SI_FIELD_LEVEL_ONE_ONLY = (1 << 4),
+ SI_FIELD_LEVEL_ONE_ONLY = (1 << 3),
};
typedef struct _SymInterpInfo {
@@ -402,12 +401,6 @@ AddInterp(CompatInfo *info, SymInterpInfo *new)
old->interp.flags |= (new->interp.flags & XkbSI_AutoRepeat);
old->defined |= SI_FIELD_AUTO_REPEAT;
}
- if (UseNewInterpField(SI_FIELD_LOCKING_KEY, old, new, verbosity,
- &collide)) {
- old->interp.flags &= ~XkbSI_LockingKey;
- old->interp.flags |= (new->interp.flags & XkbSI_LockingKey);
- old->defined |= SI_FIELD_LOCKING_KEY;
- }
if (UseNewInterpField(SI_FIELD_LEVEL_ONE_ONLY, old, new, verbosity,
&collide)) {
old->interp.match &= ~XkbSI_LevelOneOnly;
@@ -767,20 +760,9 @@ SetInterpField(CompatInfo *info, SymInterpInfo *si, const char *field,
si->defined |= SI_FIELD_AUTO_REPEAT;
}
else if (istreq(field, "locking")) {
- bool set;
-
- if (arrayNdx)
- return ReportSINotArray(info, si, field);
-
- if (!ExprResolveBoolean(keymap->ctx, value, &set))
- return ReportSIBadType(info, si, field, "boolean");
-
- if (set)
- si->interp.flags |= XkbSI_LockingKey;
- else
- si->interp.flags &= ~XkbSI_LockingKey;
-
- si->defined |= SI_FIELD_LOCKING_KEY;
+ log_dbg(info->keymap->ctx,
+ "The \"locking\" field in symbol interpretation is unsupported; "
+ "Ignored\n");
}
else if (istreq(field, "usemodmap") ||
istreq(field, "usemodmapmods")) {
diff --git a/test/data/keymaps/stringcomp.data b/test/data/keymaps/stringcomp.data
index 72234d4..110cece 100644
--- a/test/data/keymaps/stringcomp.data
+++ b/test/data/keymaps/stringcomp.data
@@ -596,7 +596,6 @@ xkb_keymap {
interpret.useModMapMods= AnyLevel;
interpret.repeat= False;
- interpret.locking= False;
interpret ISO_Level2_Latch+Exactly(Shift) {
useModMapMods=level1;
action= LatchMods(modifiers=Shift,clearLocks,latchToLock);