e_service_launcher: support splash image type of immediately prepare event sending 11/233811/1
authorJunseok, Kim <juns.kim@samsung.com>
Tue, 19 May 2020 08:36:28 +0000 (17:36 +0900)
committerJunseok, Kim <juns.kim@samsung.com>
Tue, 19 May 2020 08:36:28 +0000 (17:36 +0900)
Change-Id: I04cedf827ebf03ec7e0908cd0482fe052ba3e1a0
Signed-off-by: Junseok, Kim <juns.kim@samsung.com>
src/bin/e_policy_wl.c
src/bin/services/e_service_launcher.c
src/bin/services/e_service_launcher.h

index 124d760328fde6f310763c2f08f2f07910807b3f..1aa689eb2dc60c364dc1ee55e9d84a07ff3596c8 100644 (file)
@@ -6317,9 +6317,9 @@ _tzlaunch_splash_iface_cb_owner(struct wl_client *client EINA_UNUSED, struct wl_
         old_ec->icccm.accepts_focus = EINA_TRUE;
 
         if (new_ec)
-          e_service_launcher_callee_register(new_ec, pid, tzlaunch_splash->appid, tzlaunch_splash->path, SPLASH_GROUP_NAME);
+          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->path, SPLASH_GROUP_NAME);
+          e_service_launcher_callee_register(old_ec, pid, tzlaunch_splash->appid, tzlaunch_splash->type, tzlaunch_splash->path, SPLASH_GROUP_NAME);
 
         if (tzlaunch_splash->timeout)
           {
index e110738c23af69a96a693f1bbfb666136c71db27..6c8ecbf5ce9fee76ed26caff2ea924ef61916688 100644 (file)
@@ -41,6 +41,7 @@ struct _E_Service_Launcher
         Eina_Bool                       delay_del;      //refered delay_del
         E_Object_Delfn                 *delfn;          //del callback of target E_Client
 
+        uint32_t                        splash_type;
         const char                     *splash_path;    //path of file for splash
         const char                     *splash_group;   //group name for splash
      } target; //target window information for transition
@@ -343,21 +344,44 @@ _launcher_prepare_send(E_Service_Launcher *lc,
      {
         if (lc->target.splash_path)
           {
-             target_type = TWS_SERVICE_LAUNCHER_TARGET_TYPE_EDJE;
-             target_path = lc->target.splash_path;
-             target_group = lc->target.splash_group;
+             switch (lc->target.splash_type)
+             {
+                case 0:
+                  target_type = TWS_SERVICE_LAUNCHER_TARGET_TYPE_IMAGE;
+                  target_path = lc->target.splash_path;
 
-             len = strlen(target_path) + 1;
-             p_char = wl_array_add(&info_array, len);
-             EINA_SAFETY_ON_NULL_GOTO(p_char, fail);
+                   len = strlen(target_path) + 1;
+                   p_char = wl_array_add(&info_array, len);
+                   EINA_SAFETY_ON_NULL_GOTO(p_char, fail);
+
+                   strncpy(p_char, target_path, len);
+                   break;
+                case 1:
+                  target_type = TWS_SERVICE_LAUNCHER_TARGET_TYPE_EDJE;
+                  target_path = lc->target.splash_path;
+                  target_group = lc->target.splash_group;
 
-             strncpy(p_char, target_path, len);
+                  len = strlen(target_path) + 1;
+                  p_char = wl_array_add(&info_array, len);
+                  EINA_SAFETY_ON_NULL_GOTO(p_char, fail);
 
-             len = strlen(target_group) + 1;
-             p_char = wl_array_add(&info_array, len);
-             EINA_SAFETY_ON_NULL_GOTO(p_char, fail);
+                  strncpy(p_char, target_path, len);
 
-             strncpy(p_char, target_group, len);
+                  len = strlen(target_group) + 1;
+                  p_char = wl_array_add(&info_array, len);
+                  EINA_SAFETY_ON_NULL_GOTO(p_char, fail);
+
+                  strncpy(p_char, target_group, len);
+                  break;
+                default:
+                   target_type = TWS_SERVICE_LAUNCHER_TARGET_TYPE_REMOTE_SURFACE;
+                   res_id = e_pixmap_res_id_get(target_ec->pixmap);
+
+                   p_u32 = wl_array_add(&info_array, sizeof(uint32_t));
+                   EINA_SAFETY_ON_NULL_GOTO(p_u32, fail);
+
+                   *p_u32 = res_id;
+             }
           }
         else
           {
@@ -2360,7 +2384,7 @@ _do_launch_splash_image(E_Service_Launcher *lc)
 }
 
 EINTERN void
-e_service_launcher_callee_register(E_Client *callee, pid_t pid, const char *appid, const char *splash_path, const char *splash_group)
+e_service_launcher_callee_register(E_Client *callee, pid_t pid, const char *appid, uint32_t splash_type, const char *splash_path, const char *splash_group)
 {
    E_Service_Launcher *runner;
 
@@ -2376,11 +2400,12 @@ e_service_launcher_callee_register(E_Client *callee, pid_t pid, const char *appi
           {
              runner->target.ec = callee;
              runner->target.pid = pid;
+             runner->target.splash_type = splash_type;
              runner->target.splash_path = eina_stringshare_add(splash_path);
              runner->target.splash_group = eina_stringshare_add(splash_group);
 
-             ELOGF("LAUNCHER_SRV", "Register callee(%p)  by appid(%s) path:%s launch splash image",
-                   runner->ec, runner->target.ec, runner->target.appid, runner->target.splash_path);
+             ELOGF("LAUNCHER_SRV", "Register callee(%p)  by appid(%s) path:%s(%d) launch splash image",
+                   runner->ec, runner->target.ec, runner->target.appid, runner->target.splash_path, runner->target.splash_type);
 
              if (runner->target.ec)
                _do_launch_splash_image(runner);
index 3e0a2318177d7f388679afc41005c08a86b0dbef..df50972f557f98e098b725dd23b493c479c4731a 100644 (file)
@@ -10,7 +10,7 @@ EINTERN void              e_service_launcher_client_unset(E_Client *ec);
 EINTERN void              e_service_launcher_prepare_send_with_shared_widget_info(E_Client *target_ec, const char *shared_widget_info, uint32_t state, uint32_t serial);
 EINTERN void              e_service_launcher_release_shared_widget_launch(E_Client *ec);
 
-EINTERN void              e_service_launcher_callee_register(E_Client *callee, pid_t pid, const char *appid, const char *splash_path, const char *splash_group);
+EINTERN void              e_service_launcher_callee_register(E_Client *callee, pid_t pid, const char *appid, uint32_t splash_type, const char *splash_path, const char *splash_group);
 EINTERN void              e_service_launcher_appid_register(const char *appid, pid_t pid);
 
 // workaround to show default window effect for the