From: Lukasz Oleksak Date: Thu, 29 Jul 2021 19:06:58 +0000 (+0200) Subject: [ATSPI] Fix for SCREEN coordinate type in GetExtents X-Git-Tag: dali_2.0.39~5^2 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;ds=inline;h=fc50ab143b8d77768dddb646110fe100502a0ddf;p=platform%2Fcore%2Fuifw%2Fdali-adaptor.git [ATSPI] Fix for SCREEN coordinate type in GetExtents Change-Id: Iacb43e0ec0799b73a433bc56bf32f4bfccc86255 --- diff --git a/dali/devel-api/adaptor-framework/accessibility-impl.cpp b/dali/devel-api/adaptor-framework/accessibility-impl.cpp index 48b1a10..e7b72cb 100644 --- a/dali/devel-api/adaptor-framework/accessibility-impl.cpp +++ b/dali/devel-api/adaptor-framework/accessibility-impl.cpp @@ -28,6 +28,7 @@ // INTERNAL INCLUDES #include +#include #include #include @@ -625,7 +626,16 @@ public: Vector3 anchorPointOffSet = size * (positionUsesAnchorPoint ? actor.GetCurrentProperty(Actor::Property::ANCHOR_POINT) : AnchorPoint::TOP_LEFT); Vector2 position = Vector2(screenPosition.x - anchorPointOffSet.x, screenPosition.y - anchorPointOffSet.y); - return {position.x, position.y, size.x, size.y}; + if(type == Dali::Accessibility::CoordinateType::WINDOW) + { + return {position.x, position.y, size.x, size.y}; + } + else // Dali::Accessibility::CoordinateType::SCREEN + { + auto window = Dali::DevelWindow::Get(actor); + auto windowPosition = window.GetPosition(); + return {position.x + windowPosition.GetX(), position.y + windowPosition.GetY(), size.x, size.y}; + } } Dali::Accessibility::ComponentLayer GetLayer() override