diff options
author | Ran Benita <ran234@gmail.com> | 2012-08-27 21:31:18 +0300 |
---|---|---|
committer | Ran Benita <ran234@gmail.com> | 2012-09-01 10:59:47 +0300 |
commit | 9de067aad4e8b0d928b7674f90fb4ecda737be33 (patch) | |
tree | ea1d7d8125ad9a7cf476c1204482c3895007f99d /src/utils.h | |
parent | 7f75502f1844831a330b06c9ba0639465ff36bdf (diff) | |
download | xorg-lib-libxkbcommon-9de067aad4e8b0d928b7674f90fb4ecda737be33.tar.gz |
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>
Diffstat (limited to 'src/utils.h')
-rw-r--r-- | src/utils.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/utils.h b/src/utils.h index 89beca6..0f7a384 100644 --- a/src/utils.h +++ b/src/utils.h @@ -67,6 +67,9 @@ isempty(const char *s) return s == NULL || s[0] == '\0'; } +#define MIN(a, b) ((a) < (b) ? (a) : (b)) +#define MAX(a, b) ((a) > (b) ? (a) : (b)) + /* Compiler Attributes */ #if defined(__GNUC__) && (__GNUC__ >= 4) && !defined(__CYGWIN__) |