forked from enlightenment/efl
ecore_imf: init wayland before using wayland calls.
Summary: ecore_imf: init wayland if wayland env var exists Otherwise ecore-wl functions could return some invalid values. The env var check to avoid error messages. @fix Reviewers: Sergeant_Whitespace, devilhorns Reviewed By: Sergeant_Whitespace Subscribers: Sergeant_Whitespace, cedric Differential Revision: https://phab.enlightenment.org/D2253
This commit is contained in:
parent
2e49f60f61
commit
c77812d8b0
|
@ -143,6 +143,12 @@ im_module_init(void)
|
|||
_ecore_imf_wayland_log_dom =
|
||||
eina_log_domain_register("ecore_imf_wayland", EINA_COLOR_YELLOW);
|
||||
|
||||
if (!getenv("WAYLAND_DISPLAY"))
|
||||
return EINA_FALSE;
|
||||
|
||||
if (!ecore_wl_init(NULL))
|
||||
return EINA_FALSE;
|
||||
|
||||
ecore_imf_module_register(&wayland_im_info, im_module_create,
|
||||
im_module_exit);
|
||||
EINA_LOG_DOM_INFO(_ecore_imf_wayland_log_dom, "im module initalized");
|
||||
|
@ -154,6 +160,7 @@ static void
|
|||
im_module_shutdown(void)
|
||||
{
|
||||
EINA_LOG_DOM_INFO(_ecore_imf_wayland_log_dom, "im module shutdown");
|
||||
ecore_wl_shutdown();
|
||||
}
|
||||
|
||||
EINA_MODULE_INIT(im_module_init);
|
||||
|
|
Loading…
Reference in New Issue