path: root/src/lib/ecore_drm/ecore_drm_private.h
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_private.h
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, 7 insertions, 1 deletions
diff --git a/src/lib/ecore_drm/ecore_drm_private.h b/src/lib/ecore_drm/ecore_drm_private.h
index 6d30dee56b..c3ba84c14b 100644
--- a/src/lib/ecore_drm/ecore_drm_private.h
+++ b/src/lib/ecore_drm/ecore_drm_private.h
@@ -24,7 +24,6 @@
24# include <linux/major.h> 24# include <linux/major.h>
25# include <linux/input.h> 25# include <linux/input.h>
26# include <libinput.h> 26# include <libinput.h>
27# include <xkbcommon/xkbcommon.h>
28 27
29# ifdef HAVE_SYSTEMD 28# ifdef HAVE_SYSTEMD
30# include <systemd/sd-login.h> 29# include <systemd/sd-login.h>
@@ -69,6 +68,8 @@
69# endif 68# endif
70 69
71extern int _ecore_drm_log_dom; 70extern int _ecore_drm_log_dom;
71struct xkb_keymap *cached_keymap;
72struct xkb_context *cached_context;
72 73
73# define EVDEV_MAX_SLOTS 32 74# define EVDEV_MAX_SLOTS 32
74 75
@@ -294,4 +295,9 @@ Eina_Bool _ecore_drm_dbus_session_release(void);
294 295
295void _ecore_drm_inputs_init(void); 296void _ecore_drm_inputs_init(void);
296void _ecore_drm_inputs_shutdown(void); 297void _ecore_drm_inputs_shutdown(void);
299struct xkb_context *_ecore_drm_device_cached_context_get(enum xkb_context_flags flags);
300struct xkb_keymap *_ecore_drm_device_cached_keymap_get(struct xkb_context *ctx,
301 const struct xkb_rule_names *names,
302 enum xkb_keymap_compile_flags flags);
297#endif 303#endif