e_hwc_windows: set E_HWC_WINDOW_STATE_NONE if color of image is invisible 64/251464/1
authorChangyeon Lee <cyeon.lee@samsung.com>
Wed, 13 Jan 2021 10:49:36 +0000 (19:49 +0900)
committerChangyeon Lee <cyeon.lee@samsung.com>
Thu, 14 Jan 2021 05:28:37 +0000 (14:28 +0900)
module set argb to 0000 for making invisible even if comp object is show state

Change-Id: I2b97a00a90fed95defb70b2728c2bc44eb43f463

src/bin/e_comp_object.c
src/bin/e_comp_object.h
src/bin/e_hwc_windows.c

index d79bcd3d55a847047b6b188c7ff74d8faab73402..313c44ffa516fa871af89f23c4055594277b8488 100644 (file)
@@ -6238,3 +6238,30 @@ e_comp_object_redirected_get(Evas_Object *obj)
 
    return cw->redirected;
 }
+
+EINTERN Eina_Bool
+e_comp_object_color_visible_get(Evas_Object *obj)
+{
+   API_ENTRY EINA_FALSE;
+   int r, g, b, a;
+
+   EINA_SAFETY_ON_NULL_RETURN_VAL(cw->ec, EINA_FALSE);
+
+   evas_object_color_get(obj, &r, &g, &b, &a);
+   if ((a == 0) || ((r == 0) && (g == 0) && (b == 0)))
+     return EINA_FALSE;
+
+   evas_object_color_get(cw->effect_obj, &r, &g, &b, &a);
+   if ((a == 0) || ((r == 0) && (g == 0) && (b == 0)))
+     return EINA_FALSE;
+
+   evas_object_color_get(cw->shobj, &r, &g, &b, &a);
+   if ((a == 0) || ((r == 0) && (g == 0) && (b == 0)))
+     return EINA_FALSE;
+
+   evas_object_color_get(cw->obj, &r, &g, &b, &a);
+   if ((a == 0) || ((r == 0) && (g == 0) && (b == 0)))
+     return EINA_FALSE;
+
+   return EINA_TRUE;
+}
index 800f0c39db7eaa223a7c72234f66b08c357a6a4d..5ef01ca7907116e32cdf2bae2c3de1b934428d62 100644 (file)
@@ -200,6 +200,7 @@ E_API Eina_Bool e_comp_object_image_filter_set(Evas_Object *obj, E_Comp_Image_Fi
 EINTERN E_Comp_Image_Filter e_comp_object_image_filter_get(Evas_Object *obj);
 
 EINTERN Eina_Bool e_comp_object_redirected_get(Evas_Object *obj);
+EINTERN Eina_Bool e_comp_object_color_visible_get(Evas_Object *obj);
 #endif
 #endif
 
index 8b68b9f1b9ad9844432b4a141a2890689a24e12e..26187f852bad038da7b236156494f49df703ec6c 100644 (file)
@@ -751,7 +751,7 @@ _e_hwc_windows_target_window_rendered_window_has(E_Hwc *hwc, E_Hwc_Window *hwc_w
 }
 
 static E_Client *
-_e_hwc_windows_client_get_from_object(Evas_Object *o)
+_e_hwc_windows_client_get_from_object(Evas_Object *o, Eina_Bool *effect_client)
 {
    E_Client *ec = NULL;
    Evas_Object *ob = NULL, *cob = NULL;
@@ -761,6 +761,9 @@ _e_hwc_windows_client_get_from_object(Evas_Object *o)
 
    if (!o) return NULL;
 
+   if (effect_client)
+     *effect_client = EINA_FALSE;
+
    stack = eina_list_append(stack, o);
 
    while (1)
@@ -791,7 +794,11 @@ _e_hwc_windows_client_get_from_object(Evas_Object *o)
    eina_list_free(stack);
 
    if (!(ec) && (evas_object_visible_get(o)))
-     ec = evas_object_data_get(o, "effect_client");
+     {
+        ec = evas_object_data_get(o, "effect_client");
+        if (effect_client)
+          *effect_client = EINA_TRUE;
+     }
 
    return ec;
 }
@@ -809,12 +816,13 @@ _e_hwc_windows_visible_windows_list_get(E_Hwc *hwc)
    int ui_skip = EINA_FALSE;
    int obscured_by_target = EINA_FALSE;
    const char *type = NULL;
+   Eina_Bool effect_client;
 
    ecore_evas_geometry_get(e_comp->ee, NULL, NULL, &ee_w, &ee_h);
 
    for (o = evas_object_top_get(e_comp->evas); o; o = evas_object_below_get(o))
      {
-        ec = _e_hwc_windows_client_get_from_object(o);
+        ec = _e_hwc_windows_client_get_from_object(o, &effect_client);
         if (!ec)
           {
              if (obscured_by_target) continue;
@@ -859,6 +867,12 @@ _e_hwc_windows_visible_windows_list_get(E_Hwc *hwc)
              continue;
           }
 
+        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);
+             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))