ecore-drm: reuse any created xkb map if no cached map exists

this prevents creating many identical maps during init
This commit is contained in:
Mike Blumenkrantz 2016-04-27 12:49:11 -04:00
parent c47b5a364c
commit 03a8ab1f51
1 changed files with 2 additions and 3 deletions

View File

@ -154,9 +154,8 @@ _ecore_drm_device_cached_keymap_get(struct xkb_context *ctx, const struct xkb_ru
EINA_SAFETY_ON_NULL_RETURN_VAL(ctx, NULL);
if (!cached_keymap)
return xkb_map_new_from_names(ctx, names, flags);
else
return xkb_map_ref(cached_keymap);
cached_keymap = xkb_map_new_from_names(ctx, names, flags);
return xkb_map_ref(cached_keymap);
}
void