summaryrefslogtreecommitdiff
path: root/src/lib/ecore_imf
diff options
context:
space:
mode:
authorChris Michael <cp.michael@samsung.com>2017-02-27 12:54:38 -0500
committerChris Michael <cp.michael@samsung.com>2017-02-27 12:57:02 -0500
commit75b4bde8d226ffb59dfad5bcdcd76ce5dde5e1ac (patch)
tree674c79a9da156e490477d23f671bd8127d1fc488 /src/lib/ecore_imf
parent0a9542e2231cc8172269fba39f2173c6713c794a (diff)
ecore-imf: Don't always load all modules
If there is no ecore_imf_module specified in the environment, then previous code here would load ALL the modules when we really only need one. This patch fixes that issue...if a module is specified in the env (export ECORE_IMF_MODULE=xyz) than that module will be loaded. If NO module is specified in the env, then we will loop the list of built modules and load only one. This patch fixes an issue where running 'WAYLAND_DEBUG=1 WAYLAND_DISPLAY=wayland-0 terminology' inside an X11 environment would cause ecore_imf to load the wayland module (as reported by Derek). NB: If this patch breaks automatic IMF (it should not) then please feel free to revert. @fix Signed-off-by: Chris Michael <cp.michael@samsung.com>
Diffstat (limited to 'src/lib/ecore_imf')
-rw-r--r--src/lib/ecore_imf/ecore_imf_module.c29
1 files changed, 23 insertions, 6 deletions
diff --git a/src/lib/ecore_imf/ecore_imf_module.c b/src/lib/ecore_imf/ecore_imf_module.c
index 7ec902a..3fec5de 100644
--- a/src/lib/ecore_imf/ecore_imf_module.c
+++ b/src/lib/ecore_imf/ecore_imf_module.c
@@ -132,14 +132,31 @@ ecore_imf_module_init(void)
132 } 132 }
133 else 133 else
134 { 134 {
135 snprintf(buf, sizeof(buf), "%s/ecore_imf/modules", eina_prefix_lib_get(pfx)); 135 Eina_Module *m;
136 module_list = eina_module_arch_list_get(module_list, buf, MODULE_ARCH); 136 const char **itr;
137
138 for (itr = built_modules; *itr != NULL; itr++)
139 {
140 snprintf(buf, sizeof(buf),
141 "%s/ecore_imf/modules/%s/%s/module" SHARED_LIB_SUFFIX,
142 eina_prefix_lib_get(pfx), *itr, MODULE_ARCH);
143
144 m = eina_module_new(buf);
145 if (m)
146 {
147 module_list = eina_array_new(1);
148 if (module_list)
149 {
150 eina_array_push(module_list, m);
151 break;
152 }
153 else
154 eina_module_free(m);
155 }
156 }
137 } 157 }
138 158
139 // XXX: MODFIX: do not list ALL modules and load them ALL! this is 159 if (module_list) eina_module_list_load(module_list);
140 // is wrong - we end up loading BOTH xim ANd scim (and maybe uim too)
141 // etc. etc. when we need only 1!
142 eina_module_list_load(module_list);
143} 160}
144 161
145void 162void