From a8b4717fdf0761d0a3c8643f4328f962fc67c60b Mon Sep 17 00:00:00 2001 From: Chris Michael Date: Tue, 6 Jan 2015 13:04:04 -0500 Subject: [PATCH] fix issue where wayland modules were always creating a new compositor Signed-off-by: Chris Michael --- src/modules/wl_drm/e_mod_main.c | 7 +++++-- src/modules/wl_fb/e_mod_main.c | 10 ++++++++-- src/modules/wl_x11/e_mod_main.c | 9 +++++++-- 3 files changed, 20 insertions(+), 6 deletions(-) diff --git a/src/modules/wl_drm/e_mod_main.c b/src/modules/wl_drm/e_mod_main.c index 6d1d5ec..4025a7e 100644 --- a/src/modules/wl_drm/e_mod_main.c +++ b/src/modules/wl_drm/e_mod_main.c @@ -67,8 +67,11 @@ e_modapi_init(E_Module *m) /* return NULL; */ /* } */ - comp = e_comp_new(); - comp->comp_type = E_PIXMAP_TYPE_WL; + if (!(comp = e_comp)) + { + comp = e_comp_new(); + comp->comp_type = E_PIXMAP_TYPE_WL; + } if ((e_comp_gl_get()) && (e_comp_config_get()->engine == E_COMP_ENGINE_GL)) diff --git a/src/modules/wl_fb/e_mod_main.c b/src/modules/wl_fb/e_mod_main.c index 02f6f15..1dbe347 100644 --- a/src/modules/wl_fb/e_mod_main.c +++ b/src/modules/wl_fb/e_mod_main.c @@ -23,9 +23,15 @@ e_modapi_init(E_Module *m) ecore_fb_size_get(&w, &h); ee = ecore_evas_fb_new(NULL, 0, w, h); - comp = e_comp_new(); - comp->comp_type = E_PIXMAP_TYPE_WL; + + if (!(comp = e_comp)) + { + comp = e_comp_new(); + comp->comp_type = E_PIXMAP_TYPE_WL; + } + comp->ee = ee; + if (!e_xinerama_fake_screens_exist()) { screen = E_NEW(E_Screen, 1); diff --git a/src/modules/wl_x11/e_mod_main.c b/src/modules/wl_x11/e_mod_main.c index 9392695..b389504 100644 --- a/src/modules/wl_x11/e_mod_main.c +++ b/src/modules/wl_x11/e_mod_main.c @@ -77,9 +77,14 @@ e_modapi_init(E_Module *m) ee = ecore_evas_software_x11_new(NULL, 0, 0, 0, SCREEN_W, SCREEN_H); ecore_evas_callback_delete_request_set(ee, _cb_delete_request); - comp = e_comp_new(); - comp->comp_type = E_PIXMAP_TYPE_WL; + if (!(comp = e_comp)) + { + comp = e_comp_new(); + comp->comp_type = E_PIXMAP_TYPE_WL; + } + comp->ee = ee; + if (!e_xinerama_fake_screens_exist()) { screen = E_NEW(E_Screen, 1); -- 2.7.4