modify check condition before calling e_client_post_raise_lower_set 03/183103/1
authorDoyoun Kang <doyoun.kang@samsung.com>
Mon, 2 Jul 2018 07:59:42 +0000 (16:59 +0900)
committerDoyoun Kang <doyoun.kang@samsung.com>
Mon, 2 Jul 2018 07:59:46 +0000 (16:59 +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: I96e1ac9a5fdfe5e15cf272290e4c8f7981c89bd1

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

old mode 100755 (executable)
new mode 100644 (file)
index b6276f8..23488ca
@@ -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 3df387fd6c93630dccacb2b155a695476f87d6b2..44d6ecd1fc66d301d9e5b9c6659f7460422b9d70 100644 (file)
@@ -1513,8 +1513,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);
 
@@ -1579,8 +1582,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
@@ -1597,8 +1603,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
@@ -1618,8 +1627,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);
@@ -1637,8 +1649,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);
+     }
 }
 
 // --------------------------------------------------------
index 91ce7729066ea6caa09ec6ec2d408bfeb668d352..76c3c714ce7aa0ed30d000729746e44420951c80 100644 (file)
@@ -528,25 +528,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);