e_hwc_windows: fix the hw cursor is invisible when it is rotated 71/302371/1
authorChangyeon Lee <cyeon.lee@samsung.com>
Thu, 30 Nov 2023 02:49:46 +0000 (11:49 +0900)
committerTizen Window System <tizen.windowsystem@gmail.com>
Wed, 6 Dec 2023 03:05:50 +0000 (12:05 +0900)
evas geometry of cursor is different with e_client geometry when
cursor is rotated with evas map.
so we use evas map geomtry of cursor instead e_client geometry
when evas map of cursor is enabled.

Change-Id: I96470341a38432ee80f1dea4ea1f34823ba7fcc8

src/bin/e_hwc_windows.c

index e24447d..6592f10 100644 (file)
@@ -1118,13 +1118,14 @@ _e_hwc_windows_visible_windows_list_get(E_Hwc *hwc)
    E_Zone *zone;
    Evas_Object *o;
    int ee_w, ee_h;
-   int x, y, w, h;
+   int x, y, w, h, x1, x2, y1, y2;
    int r, g, b, a;
    int ui_skip = EINA_FALSE;
    int obscured_by_target = EINA_FALSE;
    const char *type;
    Eina_Bool effect_client;
    Evas_Render_Op render_op;
+   E_Map *map;
 
    ecore_evas_geometry_get(e_comp->ee, NULL, NULL, &ee_w, &ee_h);
 
@@ -1187,6 +1188,23 @@ _e_hwc_windows_visible_windows_list_get(E_Hwc *hwc)
 
         e_client_geometry_get(ec, &x, &y, &w, &h);
 
+        if ((ec->is_cursor) && (evas_object_map_enable_get(ec->frame)))
+          {
+             map = e_client_map_get(ec);
+             if (map)
+               {
+                  e_map_point_coord_get(map, 0, &x1, &y1, NULL);
+                  e_map_point_coord_get(map, 2, &x2, &y2, NULL);
+                  
+                  x = MIN(x1, x2);
+                  y = MIN(y1, y2);
+                  w = MAX(x1, x2) - x;
+                  h = MAX(y1, y2) - y;
+
+                  e_map_free(map);
+               }
+          }
+
         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);