e_hwc_window: do not set device state if desk geometry of ec is changed 67/242467/1
authorChangyeon Lee <cyeon.lee@samsung.com>
Tue, 25 Aug 2020 11:30:44 +0000 (20:30 +0900)
committerChangyeon Lee <cyeon.lee@samsung.com>
Thu, 27 Aug 2020 05:48:13 +0000 (14:48 +0900)
Change-Id: I19f84c6f69a05d3fbcabcd8b569c5a85e9cc98a4

src/bin/e_hwc_window.c

index 51bcd9d28c13fdc8348b83d4513a15f2a5eb5ddd..3aa1638b7d811b0b5305c28c18c633aeb9f6f006 100644 (file)
@@ -91,6 +91,7 @@ typedef enum _E_Hwc_Window_Restriction
    E_HWC_WINDOW_RESTRICTION_PIXMAP_RESOURCE,
    E_HWC_WINDOW_RESTRICTION_OBSCURED_BY_TARGET,
    E_HWC_WINDOW_RESTRICTION_IMAGE_FILTER,
+   E_HWC_WINDOW_RESTRICTION_DESK_GEOMETRY,
 } E_Hwc_Window_Restriction;
 
 static Eina_Bool ehw_trace = EINA_FALSE;
@@ -1819,6 +1820,7 @@ e_hwc_window_device_state_available_update(E_Hwc_Window *hwc_window)
    int transform;
    Eina_Bool available = EINA_TRUE;
    E_Hwc_Window_Restriction restriction = E_HWC_WINDOW_RESTRICTION_NONE;
+   E_Desk *desk;
    int count;
 
    EINA_SAFETY_ON_NULL_RETURN_VAL(hwc_window, EINA_FALSE);
@@ -1934,6 +1936,18 @@ e_hwc_window_device_state_available_update(E_Hwc_Window *hwc_window)
         goto finish;
      }
 
+   desk = e_desk_current_get(ec->zone);
+   if (desk)
+     {
+        if ((desk->geom.x != ec->zone->x) || (desk->geom.y != ec->zone->y) ||
+            (desk->geom.w != ec->zone->w) || (desk->geom.h != ec->zone->h))
+          {
+             restriction = E_HWC_WINDOW_RESTRICTION_DESK_GEOMETRY;
+             available = EINA_FALSE;
+             goto finish;
+          }
+     }
+
    transform = e_comp_wl_output_buffer_transform_get(ec);
    if ((eout->config.rotation / 90) != transform)
      {
@@ -2345,6 +2359,8 @@ e_hwc_window_restriction_string_get(E_Hwc_Window *hwc_window)
        return "obscured by target";
      case E_HWC_WINDOW_RESTRICTION_IMAGE_FILTER:
        return "image filter";
+     case E_HWC_WINDOW_RESTRICTION_DESK_GEOMETRY:
+       return "desk geometry";
      default:
        return "UNKNOWN";
     }