From 49e47ac310fb908d77d8aad19a128d273b729e0c Mon Sep 17 00:00:00 2001 From: Mike Blumenkrantz Date: Wed, 7 Feb 2018 12:09:35 -0500 Subject: [PATCH] ecore-imf: do ecore-x init during ctx creation instead of module init this avoids a number of issues with efl under wayland, msot notably the automatic triggering of xwayland during every app startup @fix --- src/modules/ecore_imf/xim/ecore_imf_xim.c | 15 ++++++--------- 1 file changed, 6 insertions(+), 9 deletions(-) diff --git a/src/modules/ecore_imf/xim/ecore_imf_xim.c b/src/modules/ecore_imf/xim/ecore_imf_xim.c index 5a10a7e539..30129a5274 100644 --- a/src/modules/ecore_imf/xim/ecore_imf_xim.c +++ b/src/modules/ecore_imf/xim/ecore_imf_xim.c @@ -739,7 +739,11 @@ static Ecore_IMF_Context_Class xim_class = { static Ecore_IMF_Context * xim_imf_module_create(void) { - Ecore_IMF_Context *ctx = ecore_imf_context_new(&xim_class); + Ecore_IMF_Context *ctx; + + if (!ecore_x_init(NULL)) + return NULL; + ctx = ecore_imf_context_new(&xim_class); DBG("ctx=%p", ctx); return ctx; } @@ -747,6 +751,7 @@ xim_imf_module_create(void) static Ecore_IMF_Context * xim_imf_module_exit(void) { + ecore_x_shutdown(); DBG(" "); return NULL; } @@ -771,12 +776,6 @@ _ecore_imf_xim_init(void) DBG(" "); - if (!ecore_x_init(NULL)) - { - eina_shutdown(); - return EINA_FALSE; - } - ecore_imf_module_register(&xim_info, xim_imf_module_create, xim_imf_module_exit); @@ -795,8 +794,6 @@ _ecore_imf_xim_shutdown(void) _ecore_imf_xim_info_im_shutdown(display, EINA_FALSE, info); } - ecore_x_shutdown(); - if (_ecore_imf_xim_log_dom >= 0) { eina_log_domain_unregister(_ecore_imf_xim_log_dom);