e_client: didn't focus client that child couldn't get focus without focus_skip_set 80/228880/1
authorJunseok, Kim <juns.kim@samsung.com>
Fri, 20 Mar 2020 10:34:08 +0000 (19:34 +0900)
committerJunSeok Kim <juns.kim@samsung.com>
Thu, 26 Mar 2020 06:45:14 +0000 (06:45 +0000)
Change-Id: I22bcbe942e328f1364efcd9583e052e12a5f11b3
Signed-off-by: Junseok, Kim <juns.kim@samsung.com>
src/bin/e_client.c

index 5a8d473..f4e9511 100644 (file)
@@ -876,7 +876,8 @@ _e_client_check_really_iconified(E_Client *ec)
 static Eina_Bool
 _e_client_focus_can_take(E_Client *ec)
 {
-   E_Client *cec = NULL;
+   E_Client *client_ec = NULL;
+   E_Client *above_ec = NULL;
 
    if (!ec) return EINA_FALSE;
    if (e_object_is_del(E_OBJECT(ec))) return EINA_FALSE;
@@ -885,17 +886,30 @@ _e_client_focus_can_take(E_Client *ec)
    if (ec->lock_focus_in || ec->lock_focus_out) return EINA_FALSE;
    if (!ec->visible) return EINA_FALSE;
    if (ec->bg_state) return EINA_FALSE;
-   if (!(cec = _e_client_check_obscured_by_children_group(ec)) ||
-       _e_client_check_really_iconified(cec))
+   if (ec->visibility.obscured != E_VISIBILITY_UNOBSCURED)
      {
-        if (ec->visibility.obscured != E_VISIBILITY_UNOBSCURED)
-          {
-             if (_e_client_check_really_iconified(ec))
-               return EINA_FALSE;
-             if (ec->visibility.obscured == E_VISIBILITY_UNKNOWN)
-               return EINA_FALSE;
-          }
-        if (_e_client_check_fully_contain_by_above(ec, EINA_FALSE)) return EINA_FALSE;
+        if (_e_client_check_really_iconified(ec))
+          return EINA_FALSE;
+        if (ec->visibility.obscured == E_VISIBILITY_UNKNOWN)
+          return EINA_FALSE;
+     }
+
+   above_ec = _e_client_check_fully_contain_by_above(ec, EINA_FALSE);
+   if (!above_ec) return EINA_TRUE;
+
+   client_ec = _e_client_check_obscured_by_children_group(ec);
+   if (!client_ec) return EINA_FALSE;
+
+   if (above_ec != client_ec)
+     return EINA_FALSE;
+
+   if (_e_client_focus_can_take(client_ec))
+     {
+        return EINA_FALSE;
+     }
+   else if (_e_client_check_fully_contain_by_above(client_ec, EINA_FALSE))
+     {
+        return EINA_FALSE;
      }
 
    return EINA_TRUE;