compat: disallow changing global defaults from within an interpret
authorRan Benita <ran234@gmail.com>
Sun, 2 Sep 2012 08:49:43 +0000 (11:49 +0300)
committerRan Benita <ran234@gmail.com>
Sun, 2 Sep 2012 15:53:01 +0000 (18:53 +0300)
commite5fdbcbb9943e9fe0952bfe8da1c304d0d5a8c6f
tree14e6b6adcb71a67c2058fbf8638e36f886312d5a
parentc9466b32dff27ec0fef42e53b4c3feb81ca00da4
compat: disallow changing global defaults from within an interpret

It's currently possible to write something like this:
    interpret Num_Lock+Any {
        virtualModifier = NumLock;
        action = LockMods(modifiers=NumLock);
        !indicator.allowExplicit;
    };
The final statement has the same effect as writing it in the global file
scope, which changes the default indicator (which all subsequent
indicators start off as). This very strange and also unused; if someone
does it he probably expects it to affect only the local scope, and he
might then get unexpected behavior. So don't allow it.

Also, HandleInterpVar is clearly a misnomer (as it can also change
indicator defaults) so rename it.

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