devilhorns pushed a commit to branch devs/devilhorns/wayland.
commit aef97cb5611c29144622b10c86f7606c8db83fa7
Author: Chris Michael <[email protected]>
Date: Thu Mar 7 13:30:58 2013 +0000
Add a job to load the wl_shell module after init is done.
Signed-off-by: Chris Michael <[email protected]>
---
src/bin/e_comp_wl.c | 24 ++++++++++++++++++++++++
1 file changed, 24 insertions(+)
diff --git a/src/bin/e_comp_wl.c b/src/bin/e_comp_wl.c
index a51d194..031ac53 100644
--- a/src/bin/e_comp_wl.c
+++ b/src/bin/e_comp_wl.c
@@ -25,6 +25,8 @@ static void _e_comp_wl_region_cb_subtract(struct wl_client
*client EINA_UNUSED,
static void _e_comp_wl_frame_cb_destroy(struct wl_resource *resource);
+static void _e_comp_wl_cb_init_job(void *data);
+
/* local wayland interfaces */
static const struct wl_compositor_interface _e_wl_comp_interface =
{
@@ -51,6 +53,9 @@ static const struct wl_region_interface
_e_wl_region_interface =
_e_comp_wl_region_cb_subtract
};
+/* local variables */
+static Ecore_Job *_init_job = NULL;
+
/* external variables */
E_Wayland_Compositor *_e_wl_comp;
@@ -115,6 +120,10 @@ e_comp_wl_init(void)
/* TODO: startup the wl_shell module so we have a shell available for
* wayland clients */
+ /* setup a job handler so we can load the wl_shell module after
+ * init has completed */
+ _init_job = ecore_job_add(_e_comp_wl_cb_init_job, NULL);
+
/* get the display's event loop */
loop = wl_display_get_event_loop(_e_wl_comp->wl.display);
@@ -551,3 +560,18 @@ _e_comp_wl_frame_cb_destroy(struct wl_resource *resource)
wl_list_remove(&cb->wl.link);
free(cb);
}
+
+static void
+_e_comp_wl_cb_init_job(void *data)
+{
+ E_Module *mod = NULL;
+
+ if (!(mod = e_module_find("wl_shell")))
+ {
+ if ((mod = e_module_new("wl_shell")))
+ e_module_enable(mod);
+ }
+
+ if (_init_job) ecore_job_del(_init_job);
+ _init_job = NULL;
+}
--
------------------------------------------------------------------------------
Symantec Endpoint Protection 12 positioned as A LEADER in The Forrester
Wave(TM): Endpoint Security, Q1 2013 and "remains a good choice" in the
endpoint security space. For insight on selecting the right partner to
tackle endpoint security challenges, access the full report.
http://p.sf.net/sfu/symantec-dev2dev