compat: ignore "group" (compatibility) statements
authorRan Benita <ran234@gmail.com>
Mon, 27 Aug 2012 18:31:18 +0000 (21:31 +0300)
committerRan Benita <ran234@gmail.com>
Sat, 1 Sep 2012 07:59:47 +0000 (10:59 +0300)
commit9de067aad4e8b0d928b7674f90fb4ecda737be33
treeea1d7d8125ad9a7cf476c1204482c3895007f99d
parent7f75502f1844831a330b06c9ba0639465ff36bdf
compat: ignore "group" (compatibility) statements

Group compatibility statements are like the following:
    group 3 = AltGr;
This currently results in:
    keymap->groups[2].mask = <real mod mapped from AltGr vmod>
And we don't do any thing with this value later. The reason it exists in
XKB is to support non-XKB clients (i.e. XKB support disabled entirely in
the server), which do not know the concept of "group", and use some
modifier to distinguish between the first and second keyboard layouts
(usually with the AltGr key). We don't care about all of that, so we can
forget about it.

One artifact of this removal is that xkb_map_num_groups no longer
works, because it counted through keymap->groups (this wasn't entirely
correct BTW). Instead we add a new num_groups member to the keymap,
which just hold the maximum among the xkb_key's num_groups. This also
means we don't have to compute anything just to get the number of
groups.

Signed-off-by: Ran Benita <ran234@gmail.com>
src/keymap-dump.c
src/map.c
src/utils.h
src/xkb-priv.h
src/xkbcomp/compat.c
test/data/keymaps/stringcomp.data