modify check condition before calling e_client_post_raise_lower_set 91/183091/1 accepted/tizen/unified/20180702.151354 submit/tizen/20180702.081014
authorDoyoun Kang <doyoun.kang@samsung.com>
Mon, 2 Jul 2018 07:00:11 +0000 (16:00 +0900)
committerDoyoun Kang <doyoun.kang@samsung.com>
Mon, 2 Jul 2018 07:00:25 +0000 (16:00 +0900)
There was a bug that the lower operation of unmapped window was not work if the window ever mapped.
So, we replaced code to "!ec->comp_data->mapped" from "!ec->first_mapped" before calling
e_client_post_raise_lower_set.

Change-Id: Ib487feb86e3ed4b772f1dfd17dd691e3a61ddf78

src/bin/e_client.c [changed mode: 0755->0644]
src/bin/e_comp_wl_shell.c
src/bin/e_policy_wl.c

old mode 100755 (executable)
new mode 100644 (file)
index ea62298..ebe2434
@@ -3546,11 +3546,8 @@ e_client_post_raise_lower_set(E_Client *ec, Eina_Bool raise_set, Eina_Bool lower
 {
    if (!ec) return;
 
-   if (!ec->first_mapped)
-     {
-        ec->post_raise = raise_set;
-        ec->post_lower = lower_set;
-     }
+   ec->post_raise = raise_set;
+   ec->post_lower = lower_set;
 }
 
 E_API Eina_Bool
index 96a7430..37d60d5 100644 (file)
@@ -738,25 +738,22 @@ _e_shell_client_map_common_post(E_Client *ec)
 {
    if (!ec) return;
 
-   if (!ec->first_mapped)
+   if ((!ec->iconic) && (!e_client_util_ignored_get(ec)))
      {
-        if ((!ec->iconic) && (!e_client_util_ignored_get(ec)))
+        if (!ec->comp_data->sub.data)
           {
-             if (!ec->comp_data->sub.data)
-               {
-                  if (ec->post_lower)
-                    evas_object_lower(ec->frame);
-                  else if (ec->post_raise)
-                    evas_object_raise(ec->frame);
+             if (ec->post_lower)
+               evas_object_lower(ec->frame);
+             else if (ec->post_raise)
+               evas_object_raise(ec->frame);
 
-                  ec->post_lower = EINA_FALSE;
-                  ec->post_raise = EINA_FALSE;
-               }
+             ec->post_lower = EINA_FALSE;
+             ec->post_raise = EINA_FALSE;
           }
-
-        ec->first_mapped = 1;
      }
 
+   ec->first_mapped = 1;
+
    e_policy_visibility_client_hide_job_cancel(ec);
    e_vis_client_check_send_pre_visibility_event(ec, EINA_FALSE);
 
index 10c4e52..064889c 100644 (file)
@@ -1477,8 +1477,11 @@ _tzpol_iface_cb_activate_below_by_res_id(struct wl_client *client EINA_UNUSED, s
 
    e_policy_stack_below(ec, below_ec);
 
-   if (!e_client_first_mapped_get(ec))
-     e_client_post_raise_lower_set(ec, EINA_FALSE, EINA_FALSE);
+   if ((ec->comp_data) && (!ec->comp_data->mapped))
+     {
+        ELOGF("TZPOL", "POST_RAISE_LOWER SET... raise:%d, lower:%d", ec->pixmap, ec, EINA_FALSE, EINA_FALSE);
+        e_client_post_raise_lower_set(ec, EINA_FALSE, EINA_FALSE);
+     }
 
    e_policy_wl_stack_changed_send(ec);
 
@@ -1543,8 +1546,11 @@ _tzpol_iface_cb_activate_above_by_res_id(struct wl_client *client EINA_UNUSED, s
 
    e_policy_stack_above(ec, above_ec);
 
-   if (!e_client_first_mapped_get(ec))
-     e_client_post_raise_lower_set(ec, EINA_FALSE, EINA_FALSE);
+   if ((ec->comp_data) && (!ec->comp_data->mapped))
+     {
+        ELOGF("TZPOL", "POST_RAISE_LOWER SET... raise:%d, lower:%d", ec->pixmap, ec, EINA_FALSE, EINA_FALSE);
+        e_client_post_raise_lower_set(ec, EINA_FALSE, EINA_FALSE);
+     }
 }
 
 static void
@@ -1561,8 +1567,11 @@ _tzpol_iface_cb_raise(struct wl_client *client EINA_UNUSED, struct wl_resource *
 
    evas_object_raise(ec->frame);
 
-   if (!e_client_first_mapped_get(ec))
-     e_client_post_raise_lower_set(ec, EINA_TRUE, EINA_FALSE);
+   if ((ec->comp_data) && (!ec->comp_data->mapped))
+     {
+        ELOGF("TZPOL", "POST_RAISE_LOWER SET... raise:%d, lower:%d", ec->pixmap, ec, EINA_TRUE, EINA_FALSE);
+        e_client_post_raise_lower_set(ec, EINA_TRUE, EINA_FALSE);
+     }
 }
 
 static void
@@ -1582,8 +1591,11 @@ _tzpol_iface_cb_lower(struct wl_client *client EINA_UNUSED, struct wl_resource *
 
    evas_object_lower(ec->frame);
 
-   if (!e_client_first_mapped_get(ec))
-     e_client_post_raise_lower_set(ec, EINA_FALSE, EINA_TRUE);
+   if ((ec->comp_data) && (!ec->comp_data->mapped))
+     {
+        ELOGF("TZPOL", "POST_RAISE_LOWER SET... raise:%d, lower:%d", ec->pixmap, ec, EINA_FALSE, EINA_TRUE);
+        e_client_post_raise_lower_set(ec, EINA_FALSE, EINA_TRUE);
+     }
 
    if (ec->focused)
      e_client_revert_focus(ec);
@@ -1601,8 +1613,11 @@ _tzpol_iface_cb_lower_by_res_id(struct wl_client *client EINA_UNUSED, struct wl_
    ELOGF("TZPOL", "LOWER by res id:%d", ec->pixmap, ec, res_id);
    evas_object_lower(ec->frame);
 
-   if (!e_client_first_mapped_get(ec))
-     e_client_post_raise_lower_set(ec, EINA_FALSE, EINA_TRUE);
+   if ((ec->comp_data) && (!ec->comp_data->mapped))
+     {
+        ELOGF("TZPOL", "POST_RAISE_LOWER SET... raise:%d, lower:%d", ec->pixmap, ec, EINA_FALSE, EINA_TRUE);
+        e_client_post_raise_lower_set(ec, EINA_FALSE, EINA_TRUE);
+     }
 }
 
 // --------------------------------------------------------