[PATCH xkbcomp] symbols: increase the warning level for shortening a key type

Peter Hutterer peter.hutterer at who-t.net
Mon Nov 2 15:06:53 PST 2015


Any use of the german keyboard layout or anything else using
level3(ralt_switch) produces the warning
    Type "ONE_LEVEL" has 1 levels, but <RALT> has 2 symbols
    Ignoring extra symbols
This warning is meaningless, the default definition for RALT comes from
pc(pc105) including altwin(meta_alt) which defines it as TWO_LEVEL
and { Alt_R, Meta_R }. Including level3(ralt_switch) correctly sets it as
ONE_LEVEL but now we get the warning. That makes users file bug reports and we
can't be having that, can we?

Up the warning level for this case to one past the default. The warning is
only useful when you're testing a new keyboard layout or trying to fix an
actual bug with missing symbols. And then you can run xkbcomp with -w10.
No need to spam the log on every server startup.

Signed-off-by: Peter Hutterer <peter.hutterer at who-t.net>
---
 symbols.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/symbols.c b/symbols.c
index d43ba9f..b5738c9 100644
--- a/symbols.c
+++ b/symbols.c
@@ -2030,7 +2030,7 @@ CopySymbolsDef(XkbFileInfo * result, KeyInfo * key, int start_from)
         type = &xkb->map->types[types[i]];
         if (type->num_levels < key->numLevels[i])
         {
-            if (warningLevel > 0)
+            if (warningLevel > 5)
             {
                 WARN4
                     ("Type \"%s\" has %d levels, but %s has %d symbols\n",
-- 
2.4.3



More information about the xorg-devel mailing list