summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCarsten Haitzler (Rasterman) <raster@rasterman.com>2018-01-17 17:33:45 +0900
committerCarsten Haitzler (Rasterman) <raster@rasterman.com>2018-01-17 18:14:29 +0900
commitd73d9022925e7f51f0b4a6eeb4b9a21a9b7cfa42 (patch)
tree4f8da6db63c49fd21eadf79a4f35ccd39ee35d1d
parent683f76beab59f0df351c5611f7e0fba5e221978c (diff)
downloadenlightenment-d73d9022925e7f51f0b4a6eeb4b9a21a9b7cfa42.tar.gz
init anim - fix sudden vanish of init splash in some cases
this seems to happen to @manmower in T6619. it may just be timing changes that changed the start loop time to be at init of ecore maybe ... but it was doing a forced hide and not a clean "done" that animates/fades. so fix this along with deferring show until the first render pre. this fixes T6619
-rw-r--r--src/bin/e_init.c32
-rw-r--r--src/bin/e_main.c8
2 files changed, 31 insertions, 9 deletions
diff --git a/src/bin/e_init.c b/src/bin/e_init.c
index 6eb1322401..28c1b723e7 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 96f8aaf15f..189ebd66fd 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;
}