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
_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");
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);