summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Blumenkrantz <zmike@osg.samsung.com>2016-04-27 12:49:11 -0400
committerMike Blumenkrantz <zmike@osg.samsung.com>2016-04-27 12:52:08 -0400
commit03a8ab1f511c0b619ebd75391465f00ca89b5e50 (patch)
tree8b31d0908f10ce8e87e24c5ddc682d8fc9913290
parentc47b5a364c7f8e467bc3976eb0e040e0fd787d3d (diff)
ecore-drm: reuse any created xkb map if no cached map exists
this prevents creating many identical maps during init
-rw-r--r--src/lib/ecore_drm/ecore_drm_device.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/lib/ecore_drm/ecore_drm_device.c b/src/lib/ecore_drm/ecore_drm_device.c
index 62f54ec..ca56034 100644
--- a/src/lib/ecore_drm/ecore_drm_device.c
+++ b/src/lib/ecore_drm/ecore_drm_device.c
@@ -154,9 +154,8 @@ _ecore_drm_device_cached_keymap_get(struct xkb_context *ctx, const struct xkb_ru
154 EINA_SAFETY_ON_NULL_RETURN_VAL(ctx, NULL); 154 EINA_SAFETY_ON_NULL_RETURN_VAL(ctx, NULL);
155 155
156 if (!cached_keymap) 156 if (!cached_keymap)
157 return xkb_map_new_from_names(ctx, names, flags); 157 cached_keymap = xkb_map_new_from_names(ctx, names, flags);
158 else 158 return xkb_map_ref(cached_keymap);
159 return xkb_map_ref(cached_keymap);
160} 159}
161 160
162void 161void