e_policy_visibility: fix bug for checking a visible state of transient_child 75/282875/2
authorDoyoun Kang <doyoun.kang@samsung.com>
Wed, 12 Oct 2022 23:20:18 +0000 (08:20 +0900)
committerSooChan Lim <sc1.lim@samsung.com>
Thu, 13 Oct 2022 00:49:17 +0000 (00:49 +0000)
There was a bug that the parent window was uniconified even though its child was not visible.
This was because that the child was uniconic state but its visibility was unknown state.
(this means it was not calculated visibility and it was not shown yet).

To resolve this problem, we add code to check whether child's visibility is unknown
in _e_policy_check_transient_child_visible function.

Change-Id: I80604558afa86fac020e0681a3bcdb8adb75bb84

src/bin/e_policy_visibility.c

index 26e7640d4fce9b018c3e2e13ffe0a9c8e9427482..fafa413bcf7d9ce8452bb09ac58b4ce0ec26a975 100644 (file)
@@ -213,13 +213,13 @@ _e_policy_check_transient_child_visible(E_Client *ancestor_ec, E_Client *ec)
           }
         else
           {
-             if ((!child_ec->iconic) ||
+             if ((!child_ec->iconic && (child_ec->visibility.obscured != E_VISIBILITY_UNKNOWN)) ||
                  (child_ec->visibility.obscured == E_VISIBILITY_UNOBSCURED))
                {
-                  ELOGF("Find visible child", "ancestor(win:0x%08zx, ec:%p), child(win:0x%08zx, ec:%p)",
+                  ELOGF("Find visible child", "ancestor(win:0x%08zx, ec:%p), child(win:0x%08zx, ec:%p, iconic:%d, vis:%d)",
                         ec,
                         e_client_util_win_get(ancestor_ec), ancestor_ec,
-                        e_client_util_win_get(child_ec), child_ec);
+                        e_client_util_win_get(child_ec), child_ec, child_ec->iconic, child_ec->visibility.obscured);
                   return EINA_TRUE;
                }
           }