diff --git a/src/bin/e_init.c b/src/bin/e_init.c index 6eb132240..28c1b723e 100644 --- a/src/bin/e_init.c +++ b/src/bin/e_init.c @@ -23,6 +23,19 @@ _e_init_cb_signal_done_ok(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED, e_init_hide(); } +static void +_e_init_render_pre(void *data EINA_UNUSED, Evas *e, void *info EINA_UNUSED) +{ + Eina_List *l; + Evas_Object *o; + + evas_event_callback_del(e, EVAS_CALLBACK_RENDER_PRE, _e_init_render_pre); + EINA_LIST_FOREACH(splash_objs, l, o) + { + evas_object_show(o); + } +} + /* public functions */ EINTERN int e_init_init(void) @@ -67,9 +80,10 @@ e_init_show(void) evas_object_move(o, zone->x, zone->y); evas_object_resize(o, zone->w, zone->h); evas_object_layer_set(o, E_LAYER_MAX - 1000); - evas_object_show(o); splash_objs = eina_list_append(splash_objs, o); } + evas_event_callback_add + (e_comp->evas, EVAS_CALLBACK_RENDER_PRE, _e_init_render_pre, NULL); edje_object_part_text_set(_e_init_object, "e.text.disable_text", "Disable splash screen"); edje_object_signal_callback_add(_e_init_object, "e,state,done_ok", "e", @@ -112,12 +126,20 @@ e_init_status_set(const char *str) E_API void e_init_done(void) { + Eina_List *l; + Evas_Object *o; + undone--; if (undone > 0) return; - done = 1; - ecore_event_add(E_EVENT_INIT_DONE, NULL, NULL, NULL); -// printf("---DONE %p\n", client); - edje_object_signal_emit(_e_init_object, "e,state,done", "e"); + if (!done) + { + done = 1; + ecore_event_add(E_EVENT_INIT_DONE, NULL, NULL, NULL); + EINA_LIST_FOREACH(splash_objs, l, o) + { + edje_object_signal_emit(o, "e,state,done", "e"); + } + } } E_API void diff --git a/src/bin/e_main.c b/src/bin/e_main.c index 96f8aaf15..189ebd66f 100644 --- a/src/bin/e_main.c +++ b/src/bin/e_main.c @@ -1042,9 +1042,6 @@ main(int argc, char **argv) } TS("Run Startup Apps Done"); - if (e_config->show_splash && (!after_restart)) - ecore_timer_loop_add(2.0, _e_main_cb_startup_fake_end, NULL); - TS("E_Comp Thaw"); e_comp_all_thaw(); TS("E_Comp Thaw Done"); @@ -1085,6 +1082,9 @@ main(int argc, char **argv) e_util_env_set("E_RESTART", "1"); + if (e_config->show_splash && (!after_restart)) + ecore_timer_add(2.0, _e_main_cb_startup_fake_end, NULL); + TS("MAIN LOOP AT LAST"); if (!setjmp(x_fatal_buff)) ecore_main_loop_begin(); @@ -1814,6 +1814,6 @@ _e_main_cb_idle_after(void *data EINA_UNUSED) static Eina_Bool _e_main_cb_startup_fake_end(void *data EINA_UNUSED) { - e_init_hide(); + e_init_done(); return ECORE_CALLBACK_CANCEL; }