transient_for: apply transient_for stack while handling map window 84/195684/3 accepted/tizen/unified/20181219.063254 submit/tizen/20181218.082737
authorDoyoun Kang <doyoun.kang@samsung.com>
Mon, 17 Dec 2018 07:54:49 +0000 (16:54 +0900)
committerGwanglim Lee <gl77.lee@samsung.com>
Mon, 17 Dec 2018 09:03:26 +0000 (09:03 +0000)
We add code to change window stack if it has a transient_for window when it is mapped.
For this, enlihghtenment does not send pre-visibility event when the window which set
transient_for to fully-obscured parent is mapped.

Change-Id: Ie96081f84277893cfbba9c283b4725867021992d

src/bin/e_comp_wl_shell.c
src/bin/e_policy.h
src/bin/e_policy_stack.c

index 1aebf1e2c938e57b4fc40779385234e8587c7651..229772c614063595d87611098801993b12699c3d 100644 (file)
@@ -739,6 +739,15 @@ _e_shell_client_map_common_post(E_Client *ec)
 
    if ((!ec->iconic) && (!e_client_util_ignored_get(ec)))
      {
+        if (ec->icccm.fetch.transient_for)
+          {
+             e_policy_stack_transient_for_apply(ec);
+             ec->icccm.fetch.transient_for = 0;
+
+             ec->post_lower = EINA_FALSE;
+             ec->post_raise = EINA_FALSE;
+          }
+
         if (!ec->comp_data->sub.data)
           {
              if (ec->post_lower)
index b0b70015e544b6bfd9e6967e29568bd17f27fc6a..f26edb185f01ba8bc82395c444fca6195244596a 100644 (file)
@@ -220,6 +220,8 @@ EINTERN void             e_policy_client_window_opaque_set(E_Client *ec);
 EINTERN void             e_policy_stack_init(void);
 EINTERN void             e_policy_stack_shutdown(void);
 EINTERN void             e_policy_stack_transient_for_set(E_Client *child, E_Client *parent);
+EINTERN void             e_policy_stack_transient_for_apply(E_Client *ec);
+
 EINTERN void             e_policy_stack_cb_client_remove(E_Client *ec);
 EINTERN void             e_policy_stack_hook_pre_fetch(E_Client *ec);
 EINTERN void             e_policy_stack_hook_pre_post_fetch(E_Client *ec);
index a36ea6025c473b84a5e556c3203c8c2c5c9a9a72..358b7b94edab01eca2e37867d7aa987d256c6b04 100644 (file)
@@ -145,8 +145,8 @@ _e_policy_stack_transient_for_tree_check(E_Client *child, E_Client *parent)
    return EINA_FALSE;
 }
 
-void
-e_policy_stack_hook_pre_post_fetch(E_Client *ec)
+static void
+_e_policy_stack_fetch_transient(E_Client *ec)
 {
    E_Client *new_focus = NULL;
    E_Policy_Stack *ps;
@@ -186,7 +186,13 @@ e_policy_stack_hook_pre_post_fetch(E_Client *ec)
 }
 
 void
-e_policy_stack_hook_pre_fetch(E_Client *ec)
+e_policy_stack_hook_pre_post_fetch(E_Client *ec)
+{
+   _e_policy_stack_fetch_transient(ec);
+}
+
+static void
+_e_policy_stack_fetch_icccm_transient_for(E_Client *ec)
 {
    if (ec->icccm.fetch.transient_for)
      {
@@ -224,6 +230,12 @@ e_policy_stack_hook_pre_fetch(E_Client *ec)
      }
 }
 
+void
+e_policy_stack_hook_pre_fetch(E_Client *ec)
+{
+   _e_policy_stack_fetch_icccm_transient_for(ec);
+}
+
 void
 e_policy_stack_transient_for_set(E_Client *ec, E_Client *parent)
 {
@@ -281,6 +293,15 @@ e_policy_stack_transient_for_set(E_Client *ec, E_Client *parent)
    EC_CHANGED(ec);
 }
 
+void
+e_policy_stack_transient_for_apply(E_Client *ec)
+{
+   if (!ec) return;
+
+   _e_policy_stack_fetch_icccm_transient_for(ec);
+   _e_policy_stack_fetch_transient(ec);
+}
+
 void
 e_policy_stack_cb_client_remove(E_Client *ec)
 {