}
}
}
+static Eina_Bool
+_launchscreen_splash_obj_set(E_Client *ec, E_Policy_Wl_Tzlaunch_Splash *splash)
+{
+ if (splash->type == 0)
+ {
+ Evas_Load_Error err;
+
+ splash->obj = evas_object_image_add(e_comp->evas);
+ EINA_SAFETY_ON_NULL_RETURN_VAL(splash->obj, EINA_FALSE);
+
+ evas_object_image_file_set(splash->obj, splash->path, NULL);
+
+ err = evas_object_image_load_error_get(splash->obj);
+ if (err != EVAS_LOAD_ERROR_NONE)
+ {
+ ELOGF("TZPOL",
+ "Launch Splash Obj setup | fail to load image %s : %s",
+ ec, splash->path, evas_load_error_str(err));
+ evas_object_del(splash->obj);
+ splash->obj = NULL;
+ return EINA_FALSE;
+ }
+
+ evas_object_image_fill_set(splash->obj, 0, 0, e_comp->w, e_comp->h);
+ evas_object_image_filled_set(splash->obj, EINA_TRUE);
+ }
+ else
+ {
+ splash->obj = edje_object_add(e_comp->evas);
+ EINA_SAFETY_ON_NULL_RETURN_VAL(splash->obj, EINA_FALSE);
+
+ if (!edje_object_file_set(splash->obj, splash->path, SPLASH_GROUP_NAME))
+ {
+ Edje_Load_Error err;
+
+ err = edje_object_load_error_get(splash->obj);
+ ELOGF("TZPOL",
+ "Launch Splash Obj setup | fail to load edje %s : %s",
+ ec, splash->path, edje_load_error_str(err));
+ evas_object_del(splash->obj);
+ splash->obj = NULL;
+ return EINA_FALSE;
+ }
+
+ evas_object_move(splash->obj, 0, 0);
+ evas_object_resize(splash->obj, e_comp->w, e_comp->h);
+ }
+ ELOGF("TZPOL",
+ "Launch Splash Obj setup | succeed to load obj from %s",
+ ec, splash->path);
+
+ return EINA_TRUE;
+}
static void
_tzlaunch_splash_iface_cb_owner(struct wl_client *client EINA_UNUSED, struct wl_resource *res_tzlaunch_splash, uint32_t pid)
if (tzlaunch_splash->custom_effect_callee)
{
- old_ec->ignored = EINA_FALSE;
- old_ec->visible = EINA_TRUE;
- if (old_ec->new_client)
- e_comp->new_clients--;
- old_ec->new_client = EINA_FALSE;
- old_ec->icccm.accepts_focus = EINA_TRUE;
-
if (new_ec)
e_service_launcher_callee_register(new_ec, pid, tzlaunch_splash->appid, tzlaunch_splash->type, tzlaunch_splash->path, SPLASH_GROUP_NAME);
else
e_service_launcher_callee_register(old_ec, pid, tzlaunch_splash->appid, tzlaunch_splash->type, tzlaunch_splash->path, SPLASH_GROUP_NAME);
- if (tzlaunch_splash->timeout)
+ if (_launchscreen_splash_obj_set(old_ec, tzlaunch_splash))
{
- ecore_timer_del(tzlaunch_splash->timeout);
- tzlaunch_splash->timeout = NULL;
- }
- if (!e_config->launchscreen_without_timer)
- tzlaunch_splash->timeout = ecore_timer_add(e_config->launchscreen_timeout, _launchscreen_splash_timeout, tzlaunch_splash);
+ old_ec->argb = EINA_FALSE;
+ ELOGF("LAUNCHER_SRV", "Set argb:%d", old_ec, old_ec->argb);
- ELOGF("TZPOL", "Launchscreen img(%d) set owner pid: %d new_ec:%p old_ec:%p",
- tzlaunch_splash->ec,
- wl_resource_get_id(res_tzlaunch_splash), pid, new_ec, old_ec);
+ //set tzlaunch_splash->obj to a content of ec->frame
+ E_Comp_Object_Content_Type content_type = 0;
+ if (tzlaunch_splash->type == 0)
+ content_type = E_COMP_OBJECT_CONTENT_TYPE_EXT_IMAGE;
+ else
+ content_type = E_COMP_OBJECT_CONTENT_TYPE_EXT_EDJE;
+ if (!e_comp_object_content_set(old_ec->frame, tzlaunch_splash->obj, content_type))
+ {
+ ELOGF("LAUNCHER_SRV", "Launchscreen set owner setup | setting comp object content failed obj(%p)",
+ old_ec, tzlaunch_splash->obj);
+ return;
+ }
- tzlaunch_splash->pid = pid;
- tzlaunch_splash->ec->netwm.pid = pid;
- tzlaunch_splash->ec->use_splash = EINA_TRUE;
+ //ref splash object
+ if (tzlaunch_splash->obj)
+ {
+ ELOGF("LAUNCHER_SRV", "Launchscreen set owner setup | tzlaunch_splash->obj:%p", old_ec, tzlaunch_splash->obj);
+ evas_object_ref(tzlaunch_splash->obj);
+
+ evas_object_event_callback_add(tzlaunch_splash->obj,
+ EVAS_CALLBACK_DEL,
+ _launchscreen_splash_cb_del, tzlaunch_splash);
+ evas_object_event_callback_add(tzlaunch_splash->obj,
+ EVAS_CALLBACK_HIDE,
+ _launchscreen_splash_cb_hide, tzlaunch_splash);
+ }
- return;
+ tzlaunch_splash->valid = EINA_TRUE;
+ tzlaunch_splash->content_type = content_type;
+ }
}
if (new_ec)
old_ec->new_client = EINA_FALSE;
old_ec->icccm.accepts_focus = EINA_TRUE;
+ e_policy_animatable_lock(old_ec, E_POLICY_ANIMATABLE_CUSTOMIZED, 1);
+
evas_object_show(old_ec->frame);
e_client_raise(old_ec);
}