From cd1f98624478297241389b6a96d9349ca7c7ab3a Mon Sep 17 00:00:00 2001 From: Chris Michael Date: Mon, 27 Feb 2017 13:26:11 -0500 Subject: [PATCH] Revert "Revert "ecore-imf: Don't always load all modules"" Reverting the revert here...this Does actually work in a wayland environment, however you may need to export ELM_DISPLAY=wl in order to get the desired result... NB: If you desire a specific ecore_imf module then you may want to export ECORE_IMF_MODULE=xyz, else this patch will try to load them in the order specified in the code (xim, ibus, scim, wayland). This reverts commit 5c858b86e5c84d4ced77d47bb61cc6817f0e3645. --- src/lib/ecore_imf/ecore_imf_module.c | 29 +++++++++++++++++++++++------ 1 file 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) } else { - snprintf(buf, sizeof(buf), "%s/ecore_imf/modules", eina_prefix_lib_get(pfx)); - module_list = eina_module_arch_list_get(module_list, buf, MODULE_ARCH); + Eina_Module *m; + const char **itr; + + for (itr = built_modules; *itr != NULL; itr++) + { + snprintf(buf, sizeof(buf), + "%s/ecore_imf/modules/%s/%s/module" SHARED_LIB_SUFFIX, + eina_prefix_lib_get(pfx), *itr, MODULE_ARCH); + + m = eina_module_new(buf); + if (m) + { + module_list = eina_array_new(1); + if (module_list) + { + eina_array_push(module_list, m); + break; + } + else + eina_module_free(m); + } + } } - // XXX: MODFIX: do not list ALL modules and load them ALL! this is - // is wrong - we end up loading BOTH xim ANd scim (and maybe uim too) - // etc. etc. when we need only 1! - eina_module_list_load(module_list); + if (module_list) eina_module_list_load(module_list); } void -- 2.7.4