summaryrefslogtreecommitdiffstats
path: root/src/3rdparty/xkbcommon/src/xkbcomp/keymap.c
diff options
context:
space:
mode:
authorGatis Paeglis <gatis.paeglis@digia.com>2014-02-05 16:25:06 +0100
committerThe Qt Project <gerrit-noreply@qt-project.org>2014-03-19 15:42:13 +0100
commitb19b0808940c8c54b102012be134a370b26e348e (patch)
tree63d951814f771e87508be7b0f8d4346d0079dc05 /src/3rdparty/xkbcommon/src/xkbcomp/keymap.c
parentc6b555dac389f9a599a9ad342de56dea329fff60 (diff)
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 <oswald.buddenhagen@digia.com> Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Diffstat (limited to 'src/3rdparty/xkbcommon/src/xkbcomp/keymap.c')
-rw-r--r--src/3rdparty/xkbcommon/src/xkbcomp/keymap.c30
1 files changed, 3 insertions, 27 deletions
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;