e_hwc_windows: set skip ui if color of window is invisible and render copy 57/255757/8
authorChangyeon Lee <cyeon.lee@samsung.com>
Tue, 23 Mar 2021 09:43:05 +0000 (18:43 +0900)
committerChangyeon Lee <cyeon.lee@samsung.com>
Fri, 26 Mar 2021 03:46:11 +0000 (12:46 +0900)
if color of window is invisible and render op is copy,
window located below it is invisible.

in the below case, stack 2 window isn't added to visible window list
after this patch is applied.

stack    window
  1      24bit transparent internal window(render copy and full size)
  2      skip iconify window (evas object is shown)

Change-Id: Ie161f9a8095fac35febd1da19c1399aa55307b12

src/bin/e_hwc_windows.c

index aff5f09f25292a35acda028d198e4f21a8914439..3c3a6e087b4955fd457d644f98687899140d1273 100644 (file)
@@ -866,6 +866,17 @@ _e_hwc_windows_client_get_from_object(Evas_Object *o, Eina_Bool *effect_client)
    return ec;
 }
 
+static Eina_Bool
+_e_hwc_windows_client_fully_mask_get(E_Client *ec, int x, int y, int w, int h,
+                                     int ee_w, int ee_h)
+{
+   if (ec->argb) return EINA_FALSE;
+   if (!E_CONTAINS(x, y, w, h, 0, 0, ee_w, ee_h)) return EINA_FALSE;
+   if (e_comp_object_is_animating(ec->frame)) return EINA_FALSE;
+
+   return EINA_TRUE;
+}
+
 static Eina_List *
 _e_hwc_windows_visible_windows_list_get(E_Hwc *hwc)
 {
@@ -880,6 +891,7 @@ _e_hwc_windows_visible_windows_list_get(E_Hwc *hwc)
    int obscured_by_target = EINA_FALSE;
    const char *type = NULL;
    Eina_Bool effect_client;
+   Evas_Render_Op render_op;
 
    ecore_evas_geometry_get(e_comp->ee, NULL, NULL, &ee_w, &ee_h);
 
@@ -933,14 +945,22 @@ _e_hwc_windows_visible_windows_list_get(E_Hwc *hwc)
              continue;
           }
 
+        e_client_geometry_get(ec, &x, &y, &w, &h);
+
         if ((!effect_client) && (!e_comp_object_color_visible_get(ec->frame)))
           {
              e_hwc_window_state_set(hwc_window, E_HWC_WINDOW_STATE_NONE, EINA_TRUE);
+
+             render_op = evas_object_render_op_get(ec->frame);
+             if ((!ui_skip) &&
+                 (render_op == EVAS_RENDER_COPY) &&
+                 (_e_hwc_windows_client_fully_mask_get(ec, x, y, w, h, ee_w, ee_h)))
+               ui_skip = EINA_TRUE;
+
              continue;
           }
 
         // check geometry if located out of screen such as quick panel
-        e_client_geometry_get(ec, &x, &y, &w, &h);
         if (!E_INTERSECTS(0, 0, ee_w, ee_h, x, y, w, h))
           {
              e_hwc_window_state_set(hwc_window, E_HWC_WINDOW_STATE_NONE, EINA_TRUE);
@@ -979,9 +999,8 @@ _e_hwc_windows_visible_windows_list_get(E_Hwc *hwc)
 
         windows_list = eina_list_append(windows_list, hwc_window);
 
-        if ((!ec->argb) &&
-            (E_CONTAINS(x, y, w, h, 0, 0, ee_w, ee_h)) &&
-            (!e_comp_object_is_animating(ec->frame)))
+        if ((!ui_skip) &&
+            (_e_hwc_windows_client_fully_mask_get(ec, x, y, w, h, ee_w, ee_h)))
           ui_skip = EINA_TRUE;
      }