From 0fb2d2200aa760243b8d83f5ca81775b96942c75 Mon Sep 17 00:00:00 2001 From: SooChan Lim Date: Fri, 5 Jul 2024 16:42:29 +0900 Subject: [PATCH] e_comp_screen: move the functions call the e_comp_screen_init() and e_comp_screen_shutdown() at the e_main.c and remove them from e_comp.c. e_comp includes the rendering compositing stuff, so e_comp_screen is not included in e_comp. Change-Id: Ic5ed41b4cd9576ab0dac489700155960e141387b --- src/bin/compmgr/e_comp.c | 17 +++-------------- src/bin/e_comp_screen.c | 3 +++ src/bin/e_main.c | 16 ++++++++++++---- 3 files changed, 18 insertions(+), 18 deletions(-) diff --git a/src/bin/compmgr/e_comp.c b/src/bin/compmgr/e_comp.c index 65360dc..359b536 100644 --- a/src/bin/compmgr/e_comp.c +++ b/src/bin/compmgr/e_comp.c @@ -2,7 +2,10 @@ #include "e_utils_intern.h" #include "e_comp_canvas_intern.h" #include "e_comp_cfdata_intern.h" +#ifdef E_DISPLAY +#else #include "e_comp_screen_intern.h" +#endif #include "e_comp_wl_intern.h" #include "e_client_intern.h" #include "e_hwc_intern.h" @@ -326,17 +329,6 @@ e_comp_init(void) if (conf->avoid_afill) e_comp->avoid_afill = EINA_TRUE; if (conf->hwc_prefer_gbm) e_comp->hwc_prefer_gbm = EINA_TRUE; - e_main_ts_begin("\tE_Comp_Screen Init"); - if (!e_comp_screen_init()) - { - e_main_ts_end("\tE_Comp_Screen Init Failed"); - ERR("Fail to init e_comp_screen"); - e_object_del(E_OBJECT(e_comp)); - E_FREE_FUNC(ignores, eina_hash_free); - return EINA_FALSE; - } - e_main_ts_end("\tE_Comp_Screen Init Done"); - if (e_comp->hwc) { if (conf->hwc_deactive) e_comp_hwc_deactive_set(EINA_TRUE); @@ -402,9 +394,6 @@ e_comp_shutdown(void) e_object_del(E_OBJECT(ec)); } - e_server_shutdown(); - e_comp_screen_shutdown(); - e_object_del(E_OBJECT(e_comp)); e_comp_object_shutdown(); E_FREE_LIST(handlers, ecore_event_handler_del); diff --git a/src/bin/e_comp_screen.c b/src/bin/e_comp_screen.c index 1b26998..fdade92 100644 --- a/src/bin/e_comp_screen.c +++ b/src/bin/e_comp_screen.c @@ -1189,6 +1189,9 @@ e_comp_screen_shutdown() E_FREE_LIST(event_handlers, ecore_event_handler_del); + e_server_shutdown(); + e_input_shutdown(); + /* delete e_comp_sreen */ _e_comp_screen_del(e_comp->e_comp_screen); e_comp->e_comp_screen = NULL; diff --git a/src/bin/e_main.c b/src/bin/e_main.c index 3f83645..c821155 100644 --- a/src/bin/e_main.c +++ b/src/bin/e_main.c @@ -34,6 +34,7 @@ #include "e_eom_intern.h" #include "e_input_intern.h" #include "e_input_backend_intern.h" +#include "e_comp_screen_intern.h" #include @@ -1120,12 +1121,17 @@ _e_main_screens_init(void) TSB("Compositor Init"); PRCTL("[Winsys] start of compositor init"); - if (!e_comp_init()) + e_comp_init(); + TSE("Compositor Init Done"); + + TSB("E_Comp_Screen Init"); + if (!e_comp_screen_init()) { - e_error_message_show(_("Enlightenment cannot create a compositor.\n")); - _e_main_shutdown(-1); + TSE("E_Comp_Screen Init Failed"); + ERR("e_comp_screen_init() failed."); + return 0; } - TSE("Compositor Init Done"); + TSE("E_Comp_Screen Init Done"); PRCTL("[Winsys] end of compositor init"); _e_main_desk_restore(); @@ -1136,12 +1142,14 @@ _e_main_screens_init(void) static int _e_main_screens_shutdown(void) { + e_comp_screen_shutdown(); e_comp_shutdown(); e_client_shutdown(); e_magnifier_shutdown(); e_desk_shutdown(); e_zone_shutdown(); + return 1; } -- 2.7.4