summaryrefslogtreecommitdiff
path: root/src/lib/ecore_imf
diff options
context:
space:
mode:
authorCarsten Haitzler (Rasterman) <raster@rasterman.com>2016-01-18 17:21:50 +0900
committerCarsten Haitzler (Rasterman) <raster@rasterman.com>2016-01-18 17:23:56 +0900
commit6f684f3a6a6cdb840c4231c0c626cde5ba1a22b1 (patch)
tree3e42e319504ceb9b0cc74f0e128b9b9aa8fd78f4 /src/lib/ecore_imf
parenta20f9b8087b85728cb03a2bcd3c6174fc05aa20b (diff)
ecore imf: fix imf module load hangs when not even configured
so on some distributions scim tries to connect and hangs waiting for connect to work. this is a problem for just loading any imf module unless EXPLICITLY configured, so disable using an imf module unless it is specifically configured to work. this fixes this hang. this is a workaround though, but what else are we to do? @fix
Diffstat (limited to 'src/lib/ecore_imf')
-rw-r--r--src/lib/ecore_imf/ecore_imf_context.c26
1 files changed, 18 insertions, 8 deletions
diff --git a/src/lib/ecore_imf/ecore_imf_context.c b/src/lib/ecore_imf/ecore_imf_context.c
index 540178537e..4c857753c5 100644
--- a/src/lib/ecore_imf/ecore_imf_context.c
+++ b/src/lib/ecore_imf/ecore_imf_context.c
@@ -34,6 +34,8 @@ ecore_imf_context_available_ids_by_canvas_type_get(const char *canvas_type)
34 * 'en', 'en_UK' against 'en_US' => 2 34 * 'en', 'en_UK' against 'en_US' => 2
35 * all locales, against '*' => 1 35 * all locales, against '*' => 1
36 */ 36 */
37/* XXX: disable because nto used anymore - see below
38 * ecore_imf_context_default_id_by_canvas_type_get
37static int 39static int
38_ecore_imf_context_match_locale(const char *locale, const char *against, int against_len) 40_ecore_imf_context_match_locale(const char *locale, const char *against, int against_len)
39{ 41{
@@ -48,6 +50,7 @@ _ecore_imf_context_match_locale(const char *locale, const char *against, int aga
48 50
49 return 0; 51 return 0;
50} 52}
53*/
51 54
52EAPI const char * 55EAPI const char *
53ecore_imf_context_default_id_get(void) 56ecore_imf_context_default_id_get(void)
@@ -56,16 +59,10 @@ ecore_imf_context_default_id_get(void)
56} 59}
57 60
58EAPI const char * 61EAPI const char *
59ecore_imf_context_default_id_by_canvas_type_get(const char *canvas_type) 62ecore_imf_context_default_id_by_canvas_type_get(const char *canvas_type EINA_UNUSED)
60{ 63{
61 const char *id; 64 const char *id = getenv("ECORE_IMF_MODULE");
62 Eina_List *modules;
63 Ecore_IMF_Module *module;
64 char *locale;
65 char *tmp;
66 int best_goodness = 0;
67 65
68 id = getenv("ECORE_IMF_MODULE");
69 if (id) 66 if (id)
70 { 67 {
71 if (strcmp(id, "none") == 0) return NULL; 68 if (strcmp(id, "none") == 0) return NULL;
@@ -79,6 +76,18 @@ ecore_imf_context_default_id_by_canvas_type_get(const char *canvas_type)
79 if (ecore_imf_module_get(id)) return id; 76 if (ecore_imf_module_get(id)) return id;
80 } 77 }
81 } 78 }
79 return NULL;
80/* XXX: I am not sure we need/want this. this causes imf modules to be
81 * used where ECORE_IMF_MODULE is not set (and this causes issues with things
82 * like scim where on some distros and some versions an scim connect BLOCKS
83 * and if no scim is around this means an app blocks/hangs ... so disable
84 * this so either you are in wayland mode OR you have to set
85 * ECORE_IMF_MODULE
86 Eina_List *modules;
87 Ecore_IMF_Module *module;
88 char *locale;
89 char *tmp;
90 int best_goodness = 0;
82 91
83 modules = ecore_imf_module_available_get(); 92 modules = ecore_imf_module_available_get();
84 if (!modules) return NULL; 93 if (!modules) return NULL;
@@ -119,6 +128,7 @@ ecore_imf_context_default_id_by_canvas_type_get(const char *canvas_type)
119 128
120 free(locale); 129 free(locale);
121 return id; 130 return id;
131 */
122} 132}
123 133
124EAPI const Ecore_IMF_Context_Info * 134EAPI const Ecore_IMF_Context_Info *