compat: ignore "locking" field in sym interprets
authorRan Benita <ran234@gmail.com>
Tue, 14 Aug 2012 13:26:30 +0000 (16:26 +0300)
committerRan Benita <ran234@gmail.com>
Sat, 1 Sep 2012 07:59:46 +0000 (10:59 +0300)
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>
src/keymap-dump.c
src/xkbcomp/compat.c
test/data/keymaps/stringcomp.data

index f406f31..897bf21 100644 (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");
 
index 7779bf0..2164377 100644 (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")) {
index 72234d4..110cece 100644 (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);