From b19b0808940c8c54b102012be134a370b26e348e Mon Sep 17 00:00:00 2001 From: Gatis Paeglis Date: Wed, 5 Feb 2014 16:25:06 +0100 Subject: Update bundled libxkbcommon version to 0.4.0 This release comes with important bug fixes. Also we can now remove the workaround code which was needed for libxkbcommon 0.2.0. Task-number: QTBUG-31712 Task-number: QTBUG-33732 Task-number: QTBUG-34056 Change-Id: I57caf7f803b9a01a15541a5ad82e464de3b8abbb Reviewed-by: Oswald Buddenhagen Reviewed-by: Lars Knoll --- src/3rdparty/xkbcommon/src/xkbcomp/keymap.c | 30 +++-------------------------- 1 file changed, 3 insertions(+), 27 deletions(-) (limited to 'src/3rdparty/xkbcommon/src/xkbcomp/keymap.c') diff --git a/src/3rdparty/xkbcommon/src/xkbcomp/keymap.c b/src/3rdparty/xkbcommon/src/xkbcomp/keymap.c index bed3930be9..549cf05da6 100644 --- a/src/3rdparty/xkbcommon/src/xkbcomp/keymap.c +++ b/src/3rdparty/xkbcommon/src/xkbcomp/keymap.c @@ -78,7 +78,6 @@ static const struct xkb_sym_interpret * FindInterpForKey(struct xkb_keymap *keymap, const struct xkb_key *key, xkb_layout_index_t group, xkb_level_index_t level) { - const struct xkb_sym_interpret *interp; const xkb_keysym_t *syms; int num_syms; @@ -93,7 +92,9 @@ FindInterpForKey(struct xkb_keymap *keymap, const struct xkb_key *key, * sym_interprets array from the most specific to the least specific, * such that when we find a match we return immediately. */ - darray_foreach(interp, keymap->sym_interprets) { + for (int i = 0; i < keymap->num_sym_interprets; i++) { + const struct xkb_sym_interpret *interp = &keymap->sym_interprets[i]; + xkb_mod_mask_t mods; bool found = false; @@ -224,28 +225,6 @@ UpdateDerivedKeymapFields(struct xkb_keymap *keymap) return true; } -static bool -UpdateBuiltinKeymapFields(struct xkb_keymap *keymap) -{ - struct xkb_context *ctx = keymap->ctx; - - /* - * Add predefined (AKA real, core, X11) modifiers. - * The order is important! - */ - darray_appends_t(keymap->mods, struct xkb_mod, - { .name = xkb_atom_intern(ctx, "Shift"), .type = MOD_REAL }, - { .name = xkb_atom_intern(ctx, "Lock"), .type = MOD_REAL }, - { .name = xkb_atom_intern(ctx, "Control"), .type = MOD_REAL }, - { .name = xkb_atom_intern(ctx, "Mod1"), .type = MOD_REAL }, - { .name = xkb_atom_intern(ctx, "Mod2"), .type = MOD_REAL }, - { .name = xkb_atom_intern(ctx, "Mod3"), .type = MOD_REAL }, - { .name = xkb_atom_intern(ctx, "Mod4"), .type = MOD_REAL }, - { .name = xkb_atom_intern(ctx, "Mod5"), .type = MOD_REAL }); - - return true; -} - typedef bool (*compile_file_fn)(XkbFile *file, struct xkb_keymap *keymap, enum merge_mode merge); @@ -311,9 +290,6 @@ CompileKeymap(XkbFile *file, struct xkb_keymap *keymap, enum merge_mode merge) if (!ok) return false; - if (!UpdateBuiltinKeymapFields(keymap)) - return false; - /* Compile sections. */ for (type = FIRST_KEYMAP_FILE_TYPE; type <= LAST_KEYMAP_FILE_TYPE; -- cgit v1.2.3