e_policy_stack: rearrange transient child stack while setting transient_for window 31/263031/1
authorDoyoun Kang <doyoun.kang@samsung.com>
Wed, 25 Aug 2021 02:12:16 +0000 (11:12 +0900)
committerDoyoun Kang <doyoun.kang@samsung.com>
Wed, 25 Aug 2021 02:12:20 +0000 (11:12 +0900)
If a window request to set transient_for(or parent), we rearrange parent's transient list.
So, the window is placed on the top of siblings or under the bottom of siblings.

Change-Id: Ie0fad8a3def35779f90775e713fbf7315c87a9c1

src/bin/e_policy_stack.c

index 84c0ce3..e05ca01 100644 (file)
@@ -322,15 +322,10 @@ _e_policy_stack_transient_for_set(E_Client *ec, E_Client *parent, Eina_Bool tran
    /* If we already have a parent, remove it */
    if (ec->parent)
      {
-        if (parent != ec->parent)
-          {
-             ec->parent->transients =
-                eina_list_remove(ec->parent->transients, ec);
-             if (ec->parent->modal == ec) ec->parent->modal = NULL;
-             ec->parent = NULL;
-          }
-        else
-          parent = NULL;
+        ec->parent->transients =
+           eina_list_remove(ec->parent->transients, ec);
+        if (ec->parent->modal == ec) ec->parent->modal = NULL;
+        ec->parent = NULL;
      }
 
    if ((parent) && (parent != ec) &&