e_desk: doing _e_desk_client_zoom recursively to zoom their subsurfaces 64/269364/1
authorJunseok, Kim <juns.kim@samsung.com>
Thu, 13 Jan 2022 04:36:41 +0000 (13:36 +0900)
committerJunseok, Kim <juns.kim@samsung.com>
Thu, 13 Jan 2022 07:01:40 +0000 (16:01 +0900)
There was a bug that video surface have irregularly zoomed during zoom effect.
It caused by video surface applied their transform after desk zoom.
For fix this problem, doing _e_desk_client_zoom recursively to adjust desk zoom after transform.

NOTE:: This patch can be repeated call of evas_map. The zoom have to be refactored for effeciency
Change-Id: I341f317eb89e9f8e38889a67180b90c73f6d99fb

src/bin/e_desk.c

index 78998a6..f0e63da 100644 (file)
@@ -1712,6 +1712,27 @@ _e_desk_object_zoom(Evas_Object *obj, double zoomx, double zoomy, Evas_Coord cx,
 }
 
 static void
+_e_desk_client_subsurface_zoom(E_Client *ec, double zoomx, double zoomy, Evas_Coord cx, Evas_Coord cy)
+{
+   E_Comp_Client_Data *cdata;
+   E_Client *subc;
+   Eina_List *l;
+
+   cdata = e_client_cdata_get(ec);
+   if (!cdata) return;
+
+   EINA_LIST_FOREACH(cdata->sub.list, l, subc)
+     {
+        _e_desk_client_zoom(subc, zoomx, zoomy, cx, cy);
+     }
+
+   EINA_LIST_FOREACH(cdata->sub.below_list, l, subc)
+     {
+        _e_desk_client_zoom(subc, zoomx, zoomy, cx, cy);
+     }
+}
+
+static void
 _e_desk_client_zoom(E_Client *ec, double zoomx, double zoomy, Evas_Coord cx, Evas_Coord cy)
 {
    Eina_Bool transformed;
@@ -1724,7 +1745,10 @@ _e_desk_client_zoom(E_Client *ec, double zoomx, double zoomy, Evas_Coord cx, Eva
    if (transformed)
      e_client_transform_core_update_with_desk_zoom(ec, zoomx, zoomy, cx, cy);
    else
-     _e_desk_object_zoom(ec->frame, zoomx, zoomy, cx, cy);
+     {
+        _e_desk_object_zoom(ec->frame, zoomx, zoomy, cx, cy);
+        _e_desk_client_subsurface_zoom(ec, zoomx, zoomy, cx, cy);
+     }
 
    if (evas_object_visible_get(ec->frame))
      {