From 8010e7d8b9159a69bcd30ec76dba11ed73675150 Mon Sep 17 00:00:00 2001 From: Chris Michael Date: Tue, 14 Oct 2014 14:44:21 -0400 Subject: [PATCH] add code to load desktop shell module Signed-off-by: Chris Michael --- src/bin/e_comp_wl.c | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) diff --git a/src/bin/e_comp_wl.c b/src/bin/e_comp_wl.c index d558e6f72..3d34ed2ab 100644 --- a/src/bin/e_comp_wl.c +++ b/src/bin/e_comp_wl.c @@ -37,6 +37,33 @@ _e_comp_wl_cb_prepare(void *data, Ecore_Fd_Handler *hdlr EINA_UNUSED) wl_display_flush_clients(cdata->wl.disp); } +static Eina_Bool +_e_comp_wl_cb_module_idle(void *data) +{ + E_Comp_Data *cdata; + E_Module *mod = NULL; + + if (!(cdata = data)) return ECORE_CALLBACK_RENEW; + + /* check if we are still loading modules */ + if (e_module_loading_get()) return ECORE_CALLBACK_RENEW; + + if (!(mod = e_module_find("wl_desktop_shell"))) + mod = e_module_new("wl_desktop_shell"); + + if (mod) + { + e_module_enable(mod); + + /* FIXME: NB: + * Do we need to dispatch pending wl events here ?? */ + + return ECORE_CALLBACK_CANCEL; + } + + return ECORE_CALLBACK_RENEW; +} + static void _e_comp_wl_compositor_cb_bind(struct wl_client *client, void *data, uint32_t version, uint32_t id) { @@ -135,6 +162,9 @@ _e_comp_wl_compositor_create(void) ecore_main_fd_handler_prepare_callback_set(cdata->fd_hdlr, _e_comp_wl_cb_prepare, cdata); + /* setup module idler to load shell mmodule */ + ecore_idler_add(_e_comp_wl_cb_module_idle, cdata); + return EINA_TRUE; comp_global_err: