summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEduardo Lima (Etrunko) <eduardo.lima@intel.com>2013-06-26 10:55:14 -0300
committerEduardo Lima (Etrunko) <eduardo.lima@intel.com>2013-06-26 10:58:36 -0300
commit2d84a8a8fbe8c9bcac625351b845b517e0d0f9bf (patch)
treec0b911c8ad101177623e193dc217b12b789a8267
parentdd76f4cd057572a11e9330f1ae2aa737c7a14d21 (diff)
WIP
Signed-off-by: Eduardo Lima (Etrunko) <eduardo.lima@intel.com>
-rw-r--r--src/modules/ecore_imf/wayland/wayland_module.c36
1 files changed, 16 insertions, 20 deletions
diff --git a/src/modules/ecore_imf/wayland/wayland_module.c b/src/modules/ecore_imf/wayland/wayland_module.c
index b7176d96cf..37f84a6aff 100644
--- a/src/modules/ecore_imf/wayland/wayland_module.c
+++ b/src/modules/ecore_imf/wayland/wayland_module.c
@@ -92,6 +92,22 @@ im_module_create()
92 Ecore_IMF_Context *ctx = NULL; 92 Ecore_IMF_Context *ctx = NULL;
93 WaylandIMContext *ctxd = NULL; 93 WaylandIMContext *ctxd = NULL;
94 94
95 if (!text_input_manager)
96 {
97 Ecore_Wl_Global *global;
98 struct wl_registry *registry = ecore_wl_registry_get();
99 struct wl_list *globals = ecore_wl_globals_get();
100
101 wl_list_for_each(global, globals, link)
102 {
103 if (!strcmp(global->interface, "wl_text_input_manager"))
104 {
105 text_input_manager = wl_registry_bind(registry, global->id, &wl_text_input_manager_interface, 1);
106 EINA_LOG_DOM_INFO(_ecore_imf_wayland_log_dom, "bound wl_text_input_manager interface");
107 }
108 }
109 }
110
95 ctxd = wayland_im_context_new(text_input_manager); 111 ctxd = wayland_im_context_new(text_input_manager);
96 if (!ctxd) 112 if (!ctxd)
97 { 113 {
@@ -113,31 +129,11 @@ im_module_create()
113static Eina_Bool 129static Eina_Bool
114im_module_init(void) 130im_module_init(void)
115{ 131{
116 struct wl_registry *registry;
117 struct wl_list *globals;
118 Ecore_Wl_Global *global;
119
120 if (!ecore_wl_init(NULL)) return EINA_FALSE; 132 if (!ecore_wl_init(NULL)) return EINA_FALSE;
121 133
122 _ecore_imf_wayland_log_dom = 134 _ecore_imf_wayland_log_dom =
123 eina_log_domain_register("ecore_imf_wayland", EINA_COLOR_YELLOW); 135 eina_log_domain_register("ecore_imf_wayland", EINA_COLOR_YELLOW);
124 136
125 ecore_wl_display_iterate();
126 registry = ecore_wl_registry_get();
127 globals = ecore_wl_globals_get();
128
129 wl_list_for_each(global, globals, link)
130 {
131 if (!strcmp(global->interface, "wl_text_input_manager"))
132 {
133 text_input_manager =
134 wl_registry_bind(registry, global->id,
135 &wl_text_input_manager_interface, 1);
136 EINA_LOG_DOM_INFO(_ecore_imf_wayland_log_dom,
137 "bound wl_text_input_manager interface");
138 }
139 }
140
141 ecore_imf_module_register(&wayland_im_info, im_module_create, 137 ecore_imf_module_register(&wayland_im_info, im_module_create,
142 im_module_exit); 138 im_module_exit);
143 EINA_LOG_DOM_INFO(_ecore_imf_wayland_log_dom, "im module initalized"); 139 EINA_LOG_DOM_INFO(_ecore_imf_wayland_log_dom, "im module initalized");