compat: remove dead NoAutomatic code
authorRan Benita <ran234@gmail.com>
Mon, 27 Aug 2012 08:38:44 +0000 (11:38 +0300)
committerRan Benita <ran234@gmail.com>
Sat, 1 Sep 2012 07:59:46 +0000 (10:59 +0300)
The xkblib spec, table 7.1 (indicators), says:
XkbIM_NoAutomatic: Xkb does not automatically change the value of the
                   indicator based upon a change in the keyboard state,
                   regardless of the values for the other fields of the
                   indicator map.

xkbcomp (the real one) never actually implemented a way for an indicator
statement to set this flag, so it's just dead unused code. We definitely
don't want to implement it ourselves, so remove any mention of it.

Signed-off-by: Ran Benita <ran234@gmail.com>
src/xkbcomp/compat.c

index 2164377..1171d18 100644 (file)
@@ -157,8 +157,7 @@ enum led_field {
     LED_FIELD_GROUPS     = (1 << 2),
     LED_FIELD_CTRLS      = (1 << 3),
     LED_FIELD_EXPLICIT   = (1 << 4),
-    LED_FIELD_AUTOMATIC  = (1 << 5),
-    LED_FIELD_DRIVES_KBD = (1 << 6),
+    LED_FIELD_DRIVES_KBD = (1 << 5),
 };
 
 typedef struct _LEDInfo {
@@ -580,12 +579,6 @@ AddIndicatorMap(CompatInfo *info, LEDInfo *new)
             old->flags |= (new->flags & XkbIM_NoExplicit);
             old->defined |= LED_FIELD_EXPLICIT;
         }
-        if (UseNewLEDField(LED_FIELD_AUTOMATIC, old, new, verbosity,
-                           &collide)) {
-            old->flags &= ~XkbIM_NoAutomatic;
-            old->flags |= (new->flags & XkbIM_NoAutomatic);
-            old->defined |= LED_FIELD_AUTOMATIC;
-        }
         if (UseNewLEDField(LED_FIELD_DRIVES_KBD, old, new, verbosity,
                            &collide)) {
             old->flags &= ~XkbIM_LEDDrivesKB;