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>
master
Ran Benita 2012-08-14 16:26:30 +03:00
parent e9aa84f311
commit 16f2de8bf0
3 changed files with 4 additions and 26 deletions

View File

@ -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");

View File

@ -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")) {

View File

@ -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);