Fixed the problem not displaying pressed image in ContextMenu
authorjisun10.lee <jisun10.lee@samsung.com>
Tue, 18 Feb 2014 13:11:52 +0000 (22:11 +0900)
committerjisun10.lee <jisun10.lee@samsung.com>
Tue, 18 Feb 2014 13:12:55 +0000 (22:12 +0900)
Change-Id: If66ed2f555b5d7555d30722d8d6cb8f59bc21020

src/ui/FUi_XUiEventManager.cpp

index aee8f0a..dcbe316 100644 (file)
@@ -578,7 +578,6 @@ private:
                        _Window* pWindow = null;
                        pWindow = pControlManager->GetTopVisibleWindowAt(Point(x, y));
                        SysTryReturn(NID_UI, pWindow, null, E_SYSTEM, "[E_SYSTEM] A system error occurred.");
-                       Tizen::Graphics::Rectangle winBounds = pWindow->GetBounds();
 
                        pRootControlElement = dynamic_cast <_ControlVisualElement*>(pWindow->GetVisualElement());
                }
@@ -586,6 +585,13 @@ private:
                SysTryReturn(NID_UI, pRootControlElement, null, E_SYSTEM, "[E_SYSTEM] A system error occurred.");
 
                _RootVisualElement* pRootVisualElement = pRootControlElement->GetRoot();
+
+               _NativeLayer* pLayer = pRootVisualElement->GetNativeLayer();
+               FloatRectangle layerBounds = pLayer->GetBounds();
+
+               ptf.x = static_cast<float>(x - layerBounds.x);
+               ptf.y = static_cast<float>(y - layerBounds.y);
+
                _ControlVisualElement* pControlVisualElement = null;
                if(pRootVisualElement)
                {