summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCarsten Haitzler (Rasterman) <raster@rasterman.com>2015-10-31 11:35:19 +0900
committerCarsten Haitzler (Rasterman) <raster@rasterman.com>2015-10-31 11:40:05 +0900
commit14d5fde2d72a933d7c0def7de310cdfda909602a (patch)
tree698b20086a5e4bc9ce1e3ffcf928e1b97e6554cf
parent081e9894d4c5636ed3bd59344cebca1b0a7fe7a3 (diff)
ecore imf - fix modules that are x11 based to only load in x11 and in wl
use env vars to determine module init for ecore-imf so you don't have things like e locking up trying to init scim when running in wl mode. do the same for ibus and xim modules too. do the inverse for wayland imf module but here add also the check for ELM_DISPLAY that wasn't there (like it is now in the other modules) so it is only initted on wayland. @fix
-rw-r--r--src/modules/ecore_imf/ibus/ibus_module.c9
-rw-r--r--src/modules/ecore_imf/scim/scim_module.cpp7
-rw-r--r--src/modules/ecore_imf/wayland/wayland_module.c9
-rw-r--r--src/modules/ecore_imf/xim/ecore_imf_xim.c7
4 files changed, 29 insertions, 3 deletions
diff --git a/src/modules/ecore_imf/ibus/ibus_module.c b/src/modules/ecore_imf/ibus/ibus_module.c
index f4e913f310..ba44fdbd15 100644
--- a/src/modules/ecore_imf/ibus/ibus_module.c
+++ b/src/modules/ecore_imf/ibus/ibus_module.c
@@ -65,7 +65,14 @@ static Ecore_IMF_Context *im_module_exit (void);
65static Eina_Bool 65static Eina_Bool
66im_module_init(void) 66im_module_init(void)
67{ 67{
68 ecore_main_loop_glib_integrate(); 68 const char *s;
69
70 if (!getenv("DISPLAY")) return EINA_FALSE;
71 if ((s = getenv("ELM_DISPLAY")))
72 {
73 if (strcmp(s, "x11")) return EINA_FALSE;
74 }
75 ecore_main_loop_glib_integrate();
69 ibus_init(); 76 ibus_init();
70 ecore_imf_module_register(&ibus_im_info, im_module_create, im_module_exit); 77 ecore_imf_module_register(&ibus_im_info, im_module_create, im_module_exit);
71 78
diff --git a/src/modules/ecore_imf/scim/scim_module.cpp b/src/modules/ecore_imf/scim/scim_module.cpp
index d77fb11f3a..12eac4f974 100644
--- a/src/modules/ecore_imf/scim/scim_module.cpp
+++ b/src/modules/ecore_imf/scim/scim_module.cpp
@@ -57,6 +57,13 @@ extern "C"
57 57
58 static Eina_Bool imf_module_init (void) 58 static Eina_Bool imf_module_init (void)
59 { 59 {
60 const char *s;
61
62 if (!getenv("DISPLAY")) return EINA_FALSE;
63 if ((s = getenv("ELM_DISPLAY")))
64 {
65 if (strcmp(s, "x11")) return EINA_FALSE;
66 }
60 ecore_imf_module_register (&isf_imf_info, imf_module_create, imf_module_exit); 67 ecore_imf_module_register (&isf_imf_info, imf_module_create, imf_module_exit);
61 return EINA_TRUE; 68 return EINA_TRUE;
62 } 69 }
diff --git a/src/modules/ecore_imf/wayland/wayland_module.c b/src/modules/ecore_imf/wayland/wayland_module.c
index 7f7b2048be..f395faaa3d 100644
--- a/src/modules/ecore_imf/wayland/wayland_module.c
+++ b/src/modules/ecore_imf/wayland/wayland_module.c
@@ -145,11 +145,16 @@ im_module_create()
145static Eina_Bool 145static Eina_Bool
146im_module_init(void) 146im_module_init(void)
147{ 147{
148 const char *s;
149
148 _ecore_imf_wayland_log_dom = 150 _ecore_imf_wayland_log_dom =
149 eina_log_domain_register("ecore_imf_wayland", EINA_COLOR_YELLOW); 151 eina_log_domain_register("ecore_imf_wayland", EINA_COLOR_YELLOW);
150 152
151 if (!getenv("WAYLAND_DISPLAY")) 153 if (!getenv("WAYLAND_DISPLAY")) return EINA_FALSE;
152 return EINA_FALSE; 154 if ((s = getenv("ELM_DISPLAY")))
155 {
156 if (strcmp(s, "wl")) return EINA_FALSE;
157 }
153 158
154 if (!ecore_wl_init(NULL)) 159 if (!ecore_wl_init(NULL))
155 return EINA_FALSE; 160 return EINA_FALSE;
diff --git a/src/modules/ecore_imf/xim/ecore_imf_xim.c b/src/modules/ecore_imf/xim/ecore_imf_xim.c
index 66a355fa27..99213a4095 100644
--- a/src/modules/ecore_imf/xim/ecore_imf_xim.c
+++ b/src/modules/ecore_imf/xim/ecore_imf_xim.c
@@ -754,6 +754,13 @@ xim_imf_module_exit(void)
754static Eina_Bool 754static Eina_Bool
755_ecore_imf_xim_init(void) 755_ecore_imf_xim_init(void)
756{ 756{
757 const char *s;
758
759 if (!getenv("DISPLAY")) return EINA_FALSE;
760 if ((s = getenv("ELM_DISPLAY")))
761 {
762 if (strcmp(s, "x11")) return EINA_FALSE;
763 }
757 eina_init(); 764 eina_init();
758 765
759 _ecore_imf_xim_log_dom = eina_log_domain_register("ecore_imf_xim", NULL); 766 _ecore_imf_xim_log_dom = eina_log_domain_register("ecore_imf_xim", NULL);