path: root/src/lib/ecore_drm/ecore_drm_evdev.c
diff options
authorJengHyun Kang <>2016-01-04 08:47:43 -0500
committerChris Michael <>2016-01-04 08:47:58 -0500
commitb3dc27345a59dc21b115fe55bb15e7af092eacbe (patch)
tree8f66f5941ab4efd09eaadb2cfca12825f09da55a /src/lib/ecore_drm/ecore_drm_evdev.c
parentfe70f0c080d2f168b5674cd4aa804ec95617739d (diff)
ecore-drm: Add a new API for keymap cache
Summary: Originally, each keyboard devices could have their own keymap. The one keyboard's keymap could different with others. But for this, Ecore_Drm compile a new keymap when a keyboard is connected. But this is a burden for some people who doesn't manage keymap for each keyboard. They want to maintain only one keymap for system. So, I added cached context/keymap and just ref/unref for each keyboard device. People who want to different keymap for each keyboard just do not set cached context/keymap. Then Ecore_Drm maintain keymaps about each keyboard devices. Test Plan: Connect a keyboard device and watch flow of ioctl. Originally Ecore_Drm opened xkb data and compile keymap, but after patch, that ioctl is disppeared. @feature Reviewers: raster, devilhorns, ManMower Reviewed By: devilhorns, ManMower Subscribers: cedric, input.hacker, ohduna, jpeg Differential Revision:
Diffstat (limited to '')
1 files changed, 1 insertions, 1 deletions
diff --git a/src/lib/ecore_drm/ecore_drm_evdev.c b/src/lib/ecore_drm/ecore_drm_evdev.c
index a57c7e84df..1f21dd6b76 100644
--- a/src/lib/ecore_drm/ecore_drm_evdev.c
+++ b/src/lib/ecore_drm/ecore_drm_evdev.c
@@ -116,7 +116,7 @@ _device_keyboard_setup(Ecore_Drm_Evdev *edev)
116 if (!input->dev->xkb_ctx) return; 116 if (!input->dev->xkb_ctx) return;
117 117
118 /* create keymap from xkb context */ 118 /* create keymap from xkb context */
119 edev->xkb.keymap = xkb_map_new_from_names(input->dev->xkb_ctx, NULL, 0); 119 edev->xkb.keymap = _ecore_drm_device_cached_keymap_get(input->dev->xkb_ctx, NULL, 0);
120 if (!edev->xkb.keymap) 120 if (!edev->xkb.keymap)
121 { 121 {
122 ERR("Failed to create keymap: %m"); 122 ERR("Failed to create keymap: %m");