e_service_launcher: fixed wrong operation for the backward direction 96/231696/1
authorGwanglim Lee <gl77.lee@samsung.com>
Thu, 23 Apr 2020 12:35:06 +0000 (21:35 +0900)
committerGwanglim Lee <gl77.lee@samsung.com>
Thu, 23 Apr 2020 12:56:40 +0000 (21:56 +0900)
activity: callee ec
given ec: callee ec (transient_for child)  <-- destroying by back key
          caller ec (transient_for parent) <-- will be shown

In this case, the given ec is a callee ec and is transient_for with caller ec (lc) by
group launching. Also, because of transient_for, caller ec is not iconified.
Since the given ec is destroyed by the back key, we can't find out caller ec(lc) with activity and given ec.
We have to use transient_for to find caller ec(lc).

Change-Id: I82e1fa23000c78739866b4ead570d740c088815d

src/bin/services/e_service_launcher.c

index 88c244cbf9e2cae11d2c61af653d3d105588a726..8afeb198d697499514dd2b584408af2f73de3ed7 100644 (file)
@@ -1505,6 +1505,26 @@ _launcher_handler_cb_hook_vis_hide(void *data EINA_UNUSED, E_Client *ec)
              /* find launcher handler again with provider ec */
              lc = _launcher_handler_launcher_find(prov_ec);
           }
+        else
+          {
+             /* Backward case
+              *
+              * activity: callee ec
+              * given ec: callee ec (transient_for child)  <-- destroying by back key
+              *           caller ec (transient_for parent) <-- will be shown
+              *
+              * In this case, the given ec is a callee ec and is transient_for with caller ec (lc) by
+              * group launching. Also, because of transient_for, caller ec is not iconified.
+              * Since the given ec is destroyed by the back key, we can't find out caller ec(lc) with activity and given ec.
+              * We have to use transient_for to find caller ec(lc).
+              */
+             ELOGF("LAUNCHER_SRV", "Hide hook of ec->parent(%p)", ec, ec->parent);
+             if (ec->parent)
+               {
+                  lc = _launcher_handler_launcher_find(ec->parent);
+                  if ((lc->launched_ec != ec)) lc = NULL;
+               }
+          }
      }
    EINA_SAFETY_ON_NULL_RETURN_VAL(lc, EINA_FALSE);