efl_ui_widget: restore legacy focus of scrollable 40/219640/1
authorYeongjong Lee <yj34.lee@samsung.com>
Sun, 8 Dec 2019 22:50:33 +0000 (07:50 +0900)
committerYeongjong Lee <yj34.lee@samsung.com>
Sun, 8 Dec 2019 22:50:33 +0000 (07:50 +0900)
restore legacy focus calculation removed from the commit below.

ref e337c53348829799e0dcac26af50e988e1b759a8

@tizen_fix

Change-Id: I08e182697795451a3381038995163df420900d1f

src/lib/elementary/efl_ui_widget.c

index 2820fbf..3cbe41e 100644 (file)
@@ -1247,8 +1247,25 @@ elm_widget_focus_region_show(Eo *obj)
              Evas_Coord sx, sy;
              Evas_Coord vx, vy;
 
-             elm_interface_scrollable_content_region_get(o, &sx, &sy, NULL, NULL);
-             elm_interface_scrollable_content_viewport_geometry_get(o, &vx, &vy, NULL, NULL);
+             //TIZEN_ONLY(202191209): restore legacy focus of scrollable
+             if (elm_widget_is_legacy(o))
+               {
+                  elm_interface_scrollable_content_region_get(o, &sx, &sy, NULL, NULL);
+                  elm_interface_scrollable_content_viewport_geometry_get(o, &vx, &vy, NULL, NULL);
+               }
+             else
+               {
+                  Eina_Position2D pos = efl_ui_scrollable_content_pos_get(o);
+                  Eina_Rect rect = efl_ui_scrollable_viewport_geometry_get(o);
+                  sx = pos.x;
+                  sy = pos.y;
+                  vx = rect.x;
+                  vy = rect.y;
+               }
+
+             //elm_interface_scrollable_content_region_get(o, &sx, &sy, NULL, NULL);
+             //elm_interface_scrollable_content_viewport_geometry_get(o, &vx, &vy, NULL, NULL);
+             //
 
              // Get the object's on_focus_region position relative to the pan in the scroller.
              Evas_Coord rx, ry;