visibility: add code to check above window's visible state before uniconifying below 71/117071/1 accepted/tizen/3.0/common/20170303.090139 accepted/tizen/3.0/ivi/20170303.074215 accepted/tizen/3.0/mobile/20170303.073823 accepted/tizen/3.0/tv/20170303.073917 accepted/tizen/3.0/wearable/20170303.074036 accepted/tizen/common/20170302.151914 accepted/tizen/ivi/20170303.005149 accepted/tizen/mobile/20170303.005100 accepted/tizen/tv/20170303.005116 accepted/tizen/wearable/20170303.005134 submit/tizen/20170302.132734 submit/tizen_3.0/20170302.132643
authorDoyoun Kang <doyoun.kang@samsung.com>
Thu, 2 Mar 2017 13:17:20 +0000 (22:17 +0900)
committerDoyoun Kang <doyoun.kang@samsung.com>
Thu, 2 Mar 2017 13:17:23 +0000 (22:17 +0900)
There was a bug that the ec's state is uniconic and unobscured but ec->frame is not shown in specific case.
This occurred circular stack issue.

Change-Id: I838ef138a4896713a26f0c12d5bcf560a14b1224

src/bin/e_policy_visibility.c

index 2bc6504f1d64c1892600a1744d3864dde1c51fcd..09c5dd195c0aa0ed06ec6acdec5143f2abf01641 100644 (file)
@@ -995,6 +995,7 @@ _e_vis_client_uniconify_render(E_Vis_Client *vc, E_Vis_Job_Type type, Eina_Bool
 
    _e_vis_client_prepare_foreground_signal_emit(vc);
    vc->state = E_VIS_ICONIFY_STATE_RUNNING_UNICONIFY;
+   VS_DBG(vc->ec, "\tUPDATE ICONIC STATE: %s", STATE_STR(vc));
    vc->grab = _e_vis_client_grab_get(vc, __func__);
    _e_vis_client_buffer_attach_handler_add(vc);
 
@@ -1013,6 +1014,7 @@ _e_vis_client_defer_move(E_Vis_Client *vc, E_Vis_Job_Type type, int x, int y)
    if (!vc) return EINA_FALSE;
 
    vc->state = E_VIS_ICONIFY_STATE_GEOMETRY_CHANGE;
+   VS_DBG(vc->ec, "\tUPDATE ICONIC STATE: %s", STATE_STR(vc));
    vc->grab = _e_vis_client_grab_get(vc, __func__);
    vc->defer.x = x;
    vc->defer.y = y;
@@ -1157,11 +1159,37 @@ _e_vis_ec_foreground_check(E_Client *ec, Eina_Bool with_transients)
    return EINA_FALSE;
 }
 
+static Eina_Bool
+_e_vis_ec_above_is_non_alpha_visible(E_Client *ec)
+{
+   E_Client *above;
+   Eina_Bool is_non_alpha_visible = EINA_FALSE;
+
+   for (above = e_client_above_get(ec); above; above = e_client_above_get(above))
+     {
+        if (e_client_util_ignored_get(above)) continue;
+        if (!E_CONTAINS(above->x, above->y, above->w, above->h, ec->x, ec->y, ec->w, ec->h)) continue;
+
+        if (above->visibility.obscured == E_VISIBILITY_UNOBSCURED)
+          {
+             if (!above->argb)
+               is_non_alpha_visible = EINA_TRUE;
+
+             break;
+          }
+     }
+
+   return is_non_alpha_visible;
+}
+
 static void
 _e_vis_ec_below_activity_clients_get(E_Client *ec, Eina_List **below_list)
 {
    E_Client *below;
 
+   if (_e_vis_ec_above_is_non_alpha_visible(ec))
+     return;
+
    for (below = e_client_below_get(ec); below; below = e_client_below_get(below))
      {
         if (!_e_vis_ec_activity_check(below, EINA_FALSE)) continue;
@@ -1314,6 +1342,7 @@ _e_vis_intercept_show(void *data EINA_UNUSED, E_Client *ec)
                     {
 
                        vc->state = E_VIS_ICONIFY_STATE_RUNNING_UNICONIFY_WAITING_FOR_CHILD;
+                       VS_DBG(vc->ec, "\tUPDATE ICONIC STATE: %s", STATE_STR(vc));
                        vc->grab = _e_vis_client_grab_get(vc, __func__);
                        e_comp_object_signal_callback_add(topmost->frame,
                                                          "e,action,launch,done",