keymap-dump: Print NoAction actions too
authorDaniel Stone <daniel@fooishbar.org>
Sat, 2 Jun 2012 14:25:36 +0000 (15:25 +0100)
committerDaniel Stone <daniel@fooishbar.org>
Sat, 2 Jun 2012 14:25:36 +0000 (15:25 +0100)
The failure mode here is a little irritating:
    - server loads map with ISO_Lock action
    - server dumps keymap to string, including:
      interpret ISO_Lock+AnyOfOrAll(None) {
          action= NoAction();
      };
      as we don't (yet) print ISO_Lock actions
    - client parses keymap from string
    - client dumps keymap to string, including:
      interpret ISO_Lock+AnyOfOrAll(None) {
      };
    - this results in a syntax error

Signed-off-by: Daniel Stone <daniel@fooishbar.org>
src/keymap-dump.c

index 5dc8166..76b97f8 100644 (file)
@@ -481,9 +481,6 @@ write_action(struct xkb_keymap *keymap, char **buf, size_t *size,
     if (!suffix)
         suffix = "";
 
-    if (action->any.type == XkbSA_NoAction)
-        return true;
-
     switch (action->any.type) {
     case XkbSA_SetMods:
         if (!type)