e_service_launcher: fixed wrong operation for the backward direction 95/231695/2
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:30:01 +0000 (12:30 +0000)
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 6cff7008f345cc475e737deb8e707e31c268a435..b79b4dba9a26342ac9602a5bf4195a6134a3f9c6 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;
+               }
+          }
      }
    if (!lc) return EINA_FALSE;