devilhorns pushed a commit to branch master. http://git.enlightenment.org/core/enlightenment.git/commit/?id=62471b5b5be4f4ab59a7f8585cdbc89cd16296c0
commit 62471b5b5be4f4ab59a7f8585cdbc89cd16296c0 Author: Chris Michael <cp.mich...@samsung.com> Date: Tue Oct 14 14:03:15 2014 -0400 add functions to create new compositor Signed-off-by: Chris Michael <cp.mich...@samsung.com> --- src/bin/e_comp_wl.c | 41 ++++++++++++++++++++++++++++++++++++++++- 1 file changed, 40 insertions(+), 1 deletion(-) diff --git a/src/bin/e_comp_wl.c b/src/bin/e_comp_wl.c index d8dc407..30b631e 100644 --- a/src/bin/e_comp_wl.c +++ b/src/bin/e_comp_wl.c @@ -6,6 +6,38 @@ #define E_COMP_WL_PIXMAP_CHECK \ if (e_pixmap_type_get(ec->pixmap) != E_PIXMAP_TYPE_WL) return +/* local functions */ +static void +_e_comp_wl_cb_del(E_Comp *comp) +{ + E_Comp_Data *cdata; + + /* get existing compositor data */ + if (!(cdata = comp->wl_comp_data)) return; + + /* free allocated data structure */ + free(cdata); +} + +static Eina_Bool +_e_comp_wl_compositor_create(void) +{ + E_Comp *comp; + + /* check for existing compositor. create if needed */ + if (!(comp = e_comp_get(NULL))) + { + comp = e_comp_new(); + comp->comp_type = E_PIXMAP_TYPE_WL; + E_OBJECT_DEL_SET(comp, _e_comp_wl_cb_del); + } + + /* create new compositor data */ + cdata = E_NEW(E_Comp_Data, 1); + + return EINA_TRUE; +} + /* public functions */ EAPI Eina_Bool e_comp_wl_init(void) @@ -15,7 +47,14 @@ e_comp_wl_init(void) ecore_evas_engine_type_supported_get(ECORE_EVAS_ENGINE_OPENGL_DRM)) e_comp_gl_set(EINA_TRUE); - return EINA_FALSE; + /* try to create a wayland compositor */ + if (!_e_comp_wl_compositor_create()) + { + e_error_message_show(_("Enlightenment cannot create a Wayland Compositor!\n")); + return EINA_FALSE; + } + + return EINA_TRUE; } EAPI struct wl_signal --