Fixed the position of VE Window
authorChoi Munseok <ms47.choi@samsung.com>
Mon, 16 Sep 2013 01:28:25 +0000 (10:28 +0900)
committerChoi Munseok <ms47.choi@samsung.com>
Mon, 16 Sep 2013 01:28:25 +0000 (10:28 +0900)
Change-Id: I25e58589438d5e1af356224e9e7f6f56896d339e
Signed-off-by: Choi Munseok <ms47.choi@samsung.com>
src/ui/FUi_Control.cpp

index e4d4959..5c13be9 100644 (file)
@@ -3134,7 +3134,36 @@ _Control::SetBoundsFinal(const FloatRectangle& newBounds, bool changeLayoutBaseR
                }
                else
                {
-                       r = UpdateBoundsOfVisualElement(fbounds);
+                       bool isAdjustPosition = false;
+                       
+                       _Window* pWindow = dynamic_cast<_Window*>(this);
+                       _Window* pRootWindow = null;
+                       if (pWindow)
+                       {
+                               _WindowType winType = pWindow->GetWindowType();
+                               if (winType == _WINDOW_TYPE_VE)
+                               {
+                                       _Control* pOwner = pWindow->GetOwner();
+                                       if (pOwner)
+                                       {
+                                               pRootWindow = pOwner->GetRootWindow();
+                                               if (pRootWindow)
+                                               {
+                                                       isAdjustPosition = true;
+                                               }
+                                       }
+                               }
+                       }
+
+                       if (isAdjustPosition == true)
+                       {
+                               FloatPoint ownerPosition = pRootWindow->GetPositionF();
+                               r = UpdateBoundsOfVisualElement(FloatRectangle(fbounds.x - ownerPosition.x, fbounds.y - ownerPosition.y, fbounds.width, fbounds.height));
+                       }
+                       else
+                       {
+                               r = UpdateBoundsOfVisualElement(fbounds);
+                       }
                }
        }