rotation: do not insert a client to rotation list if the client is laid below backgro... 51/91351/1
authorSeunghun Lee <shiin.lee@samsung.com>
Fri, 7 Oct 2016 06:07:28 +0000 (15:07 +0900)
committerSeunghun Lee <shiin.lee@samsung.com>
Fri, 7 Oct 2016 06:17:22 +0000 (15:17 +0900)
a client under background client must not be rotated.
and if a client is liad same layer with background, I suppose that the client
will raise sometime later.

Change-Id: Iaced186fde7b93dee0edda30f3cbee82d88b8f23

src/rotation/e_mod_rotation_wl.c

index 26223d0..3e3fb78 100644 (file)
@@ -519,10 +519,10 @@ _e_client_rotation_list_remove(E_Client *ec)
 static Eina_Bool
 _e_client_rotation_zone_set(E_Zone *zone, E_Client *include_ec, E_Client *exclude_ec)
 {
-   E_Client *ec;
+   E_Client *ec, *bg_ec = NULL;
    Eina_List *target_list = NULL, *l;
    int i, angle;
-   Eina_Bool can_rotate = EINA_TRUE, ret = EINA_FALSE, found_bg_ec = EINA_FALSE;
+   Eina_Bool can_rotate = EINA_TRUE, ret = EINA_FALSE;
 
    TRACE_DS_BEGIN(CLIENT ROTATION ZONE SET);
 
@@ -540,7 +540,9 @@ _e_client_rotation_zone_set(E_Zone *zone, E_Client *include_ec, E_Client *exclud
              continue;
           }
 
-        if ((!found_bg_ec) || (include_ec == ec))
+        if ((!bg_ec) ||
+            ((include_ec == ec) &&
+             (evas_object_layer_get(ec->frame) >= evas_object_layer_get(bg_ec->frame))))
           {
              EDBG(ec, "Append to rotation target list");
              target_list = eina_list_append(target_list, ec);
@@ -558,7 +560,7 @@ _e_client_rotation_zone_set(E_Zone *zone, E_Client *include_ec, E_Client *exclud
              if (!ec->argb)
                {
                   EDBG(ec, "Found Topmost Fullscreen Window");
-                  found_bg_ec = EINA_TRUE;
+                  bg_ec = ec;
                }
              else
                {
@@ -566,7 +568,7 @@ _e_client_rotation_zone_set(E_Zone *zone, E_Client *include_ec, E_Client *exclud
                       (!ec->parent))
                     {
                        EDBG(ec, "Found Topmost Fullscreen Window");
-                       found_bg_ec = EINA_TRUE;
+                       bg_ec = ec;
                     }
                }
           }