Make boot-animation window as TOP to blocking the sudden appearence of the other app 32/164632/1 submit/tizen/20171220.060406
authorjunkyu han <junkyu.han@samsung.com>
Wed, 20 Dec 2017 05:50:37 +0000 (14:50 +0900)
committerjunkyu han <junkyu.han@samsung.com>
Wed, 20 Dec 2017 05:50:37 +0000 (14:50 +0900)
Change-Id: Ic5eb9319641cc156faf5ebd8212319517c149050

src/animation.c

index d9abd8b..a23a3c0 100755 (executable)
@@ -38,6 +38,16 @@ static struct animation {
        .animation_type = 0,
 };
 
+static void __visibility_changed_cb(void *data, Evas_Object *obj, void *event)
+{
+       __D("Visibility changed");
+       int visibility = (int)(void *)event;
+
+       if (!visibility)
+               boot_exit();
+}
+
+
 static void __win_del_cb(void *data, Evas_Object * obj, void *event_info)
 {
        __D("Window delete event received");
@@ -55,9 +65,10 @@ static Evas_Object *__create_window(void)
                __E("Failed to create a new window");
                return NULL;
        }
-       elm_win_aux_hint_add(win, "wm.comp.win.always.selective.mode", "1");
        elm_win_role_set(win, "alert");
-       efl_util_set_notification_window_level(win, EFL_UTIL_NOTIFICATION_LEVEL_HIGH);
+       efl_util_set_notification_window_level(win, EFL_UTIL_NOTIFICATION_LEVEL_TOP);
+       evas_object_smart_callback_add(s_animation.win, "visibility,changed", __visibility_changed_cb, NULL);
+       elm_win_aux_hint_add(win, "wm.comp.win.always.selective.mode", "0");
        evas_object_smart_callback_add(win, "delete-request", __win_del_cb, NULL);
 
        elm_win_screen_size_get(win, NULL, NULL, &s_animation.win_w, &s_animation.win_h);
@@ -99,9 +110,6 @@ static Eina_Bool __end_cb(void *data)
                __block_display();
        } else {
                __D("EXIT on BOOTING");
-               if (vconf_set_int(VCONFKEY_BOOT_ANIMATION_FINISHED, 1) != 0)
-                       __E("Failed to set finished set");
-
                boot_exit();
        }
        return ECORE_CALLBACK_CANCEL;
@@ -111,14 +119,15 @@ static void __animation_finished_cb(void *d, Evas_Object * obj, const char *e, c
 {
        if (s_animation.animation_type == TYPE_OFF) {
                __D("TYPE OFF");
-               if (vconf_set_int(VCONFKEY_BOOT_ANIMATION_FINISHED, 1) != 0)
-                       __E("Failed to set finished set");
-
                ecore_timer_add(1, __end_cb, (void *)TYPE_OFF);
        } else {
                __D("TYPE_ON");
-               __end_cb((void *)TYPE_ON);
+               efl_util_set_notification_window_level(s_animation.win, EFL_UTIL_NOTIFICATION_LEVEL_NONE);
+               ecore_timer_add(10, __end_cb, (void *)TYPE_ON);
        }
+
+       if (vconf_set_int(VCONFKEY_BOOT_ANIMATION_FINISHED, 1) != 0)
+               __E("Failed to set finished set");
 }
 
 static Evas_Object * __create_layout(Evas_Object *win, const char *file_name)