e_policy_stack: added code to check transient_for below order 13/267513/1
authorJunseok, Kim <juns.kim@samsung.com>
Mon, 6 Dec 2021 10:05:00 +0000 (19:05 +0900)
committerJunSeok Kim <juns.kim@samsung.com>
Mon, 6 Dec 2021 10:35:40 +0000 (10:35 +0000)
There was a bug that the transient_for_below children stack was incorrect.

when there're child A and B(the child A was created first),
and client request transient_for_below B and A to parent.
then, the expected stack is [top] - Parent - B - A - [bottom]
but actual stack is [top] - Parent - A - B - [bottom]

This issue caused by the fetching order of child window.
To fix this issue, this patch makes check transient_for_below order when fetching transient_for.

This patch is similar with commit 40a650f

Change-Id: I711ec30fed00d3ae8f6ff77b70cceae7ac2e49de

src/bin/e_policy_stack.c

index f82cae008dea2d267c1171fdbeafee5a4942f43a..090deebe30aa6d644ccbf1b0bafad5804da31203 100644 (file)
@@ -191,7 +191,16 @@ _e_policy_stack_transient_for_apply(E_Client *ec)
                          }
 
                        if (e_client_transient_policy_get(bottom) == E_TRANSIENT_BELOW)
-                         break;
+                         {
+                            int ec_id = eina_list_data_idx(ec->parent->transients, ec);
+                            int bottom_id = eina_list_data_idx(ec->parent->transients, bottom);
+                            if (bottom_id < ec_id)
+                              {
+                                 bottom = e_client_above_get(bottom);
+                                 continue;
+                              }
+                            break;
+                         }
                     }
 
                   if (_e_policy_stack_transient_for_check_descendant(bottom, ec->parent, E_TRANSIENT_BELOW))