diff options
author | Ran Benita <ran234@gmail.com> | 2012-10-10 19:08:01 +0200 |
---|---|---|
committer | Ran Benita <ran234@gmail.com> | 2012-10-10 19:44:23 +0200 |
commit | 9197eb0fb38ae7e1c70e085b67305c2171f50aac (patch) | |
tree | aa4722951343883b2512fa0ab0d6cd5e2b81a617 /src/keymap.h | |
parent | f3732d8349556e8615cb704fa9643712e954fee6 (diff) | |
download | xorg-lib-libxkbcommon-9197eb0fb38ae7e1c70e085b67305c2171f50aac.tar.gz |
Remove the XKB_NUM_INDICATORS limit
Use a darray instead of a static array of size 32.
We still enforce XKB_MAX_LEDS because of the size of xkb_led_mask_t.
Signed-off-by: Ran Benita <ran234@gmail.com>
Diffstat (limited to 'src/keymap.h')
-rw-r--r-- | src/keymap.h | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/keymap.h b/src/keymap.h index 74efe78..11fa743 100644 --- a/src/keymap.h +++ b/src/keymap.h @@ -106,15 +106,15 @@ /* Don't allow more modifiers than we can hold in xkb_mod_mask_t. */ #define XKB_MAX_MODS ((xkb_mod_index_t) (sizeof(xkb_mod_mask_t) * 8)) -/* These should all be dynamic. */ -#define XKB_NUM_INDICATORS 32 +/* Don't allow more leds than we can hold in xkb_led_mask_t. */ +#define XKB_MAX_LEDS ((xkb_led_index_t) (sizeof(xkb_led_mask_t) * 8)) +/* These should all go away. */ enum mod_type { MOD_REAL = (1 << 0), MOD_VIRT = (1 << 1), MOD_BOTH = (MOD_REAL | MOD_VIRT), }; - #define MOD_REAL_MASK_ALL ((xkb_mod_mask_t) 0x000000ff) enum xkb_action_type { @@ -398,7 +398,7 @@ struct xkb_keymap { xkb_layout_index_t num_groups; darray_xkb_atom_t group_names; - struct xkb_indicator_map indicators[XKB_NUM_INDICATORS]; + darray(struct xkb_indicator_map) indicators; char *keycodes_section_name; char *symbols_section_name; |