forked from enlightenment/efl
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
This commit is contained in:
parent
081e9894d4
commit
14d5fde2d7
|
@ -65,6 +65,13 @@ static Ecore_IMF_Context *im_module_exit (void);
|
||||||
static Eina_Bool
|
static Eina_Bool
|
||||||
im_module_init(void)
|
im_module_init(void)
|
||||||
{
|
{
|
||||||
|
const char *s;
|
||||||
|
|
||||||
|
if (!getenv("DISPLAY")) return EINA_FALSE;
|
||||||
|
if ((s = getenv("ELM_DISPLAY")))
|
||||||
|
{
|
||||||
|
if (strcmp(s, "x11")) return EINA_FALSE;
|
||||||
|
}
|
||||||
ecore_main_loop_glib_integrate();
|
ecore_main_loop_glib_integrate();
|
||||||
ibus_init();
|
ibus_init();
|
||||||
ecore_imf_module_register(&ibus_im_info, im_module_create, im_module_exit);
|
ecore_imf_module_register(&ibus_im_info, im_module_create, im_module_exit);
|
||||||
|
|
|
@ -57,6 +57,13 @@ extern "C"
|
||||||
|
|
||||||
static Eina_Bool imf_module_init (void)
|
static Eina_Bool imf_module_init (void)
|
||||||
{
|
{
|
||||||
|
const char *s;
|
||||||
|
|
||||||
|
if (!getenv("DISPLAY")) return EINA_FALSE;
|
||||||
|
if ((s = getenv("ELM_DISPLAY")))
|
||||||
|
{
|
||||||
|
if (strcmp(s, "x11")) return EINA_FALSE;
|
||||||
|
}
|
||||||
ecore_imf_module_register (&isf_imf_info, imf_module_create, imf_module_exit);
|
ecore_imf_module_register (&isf_imf_info, imf_module_create, imf_module_exit);
|
||||||
return EINA_TRUE;
|
return EINA_TRUE;
|
||||||
}
|
}
|
||||||
|
|
|
@ -145,11 +145,16 @@ im_module_create()
|
||||||
static Eina_Bool
|
static Eina_Bool
|
||||||
im_module_init(void)
|
im_module_init(void)
|
||||||
{
|
{
|
||||||
|
const char *s;
|
||||||
|
|
||||||
_ecore_imf_wayland_log_dom =
|
_ecore_imf_wayland_log_dom =
|
||||||
eina_log_domain_register("ecore_imf_wayland", EINA_COLOR_YELLOW);
|
eina_log_domain_register("ecore_imf_wayland", EINA_COLOR_YELLOW);
|
||||||
|
|
||||||
if (!getenv("WAYLAND_DISPLAY"))
|
if (!getenv("WAYLAND_DISPLAY")) return EINA_FALSE;
|
||||||
return EINA_FALSE;
|
if ((s = getenv("ELM_DISPLAY")))
|
||||||
|
{
|
||||||
|
if (strcmp(s, "wl")) return EINA_FALSE;
|
||||||
|
}
|
||||||
|
|
||||||
if (!ecore_wl_init(NULL))
|
if (!ecore_wl_init(NULL))
|
||||||
return EINA_FALSE;
|
return EINA_FALSE;
|
||||||
|
|
|
@ -754,6 +754,13 @@ xim_imf_module_exit(void)
|
||||||
static Eina_Bool
|
static Eina_Bool
|
||||||
_ecore_imf_xim_init(void)
|
_ecore_imf_xim_init(void)
|
||||||
{
|
{
|
||||||
|
const char *s;
|
||||||
|
|
||||||
|
if (!getenv("DISPLAY")) return EINA_FALSE;
|
||||||
|
if ((s = getenv("ELM_DISPLAY")))
|
||||||
|
{
|
||||||
|
if (strcmp(s, "x11")) return EINA_FALSE;
|
||||||
|
}
|
||||||
eina_init();
|
eina_init();
|
||||||
|
|
||||||
_ecore_imf_xim_log_dom = eina_log_domain_register("ecore_imf_xim", NULL);
|
_ecore_imf_xim_log_dom = eina_log_domain_register("ecore_imf_xim", NULL);
|
||||||
|
|
Loading…
Reference in New Issue