Fix the _Window
authorChoi Munseok <ms47.choi@samsung.com>
Tue, 11 Jun 2013 07:26:42 +0000 (16:26 +0900)
committerChoi Munseok <ms47.choi@samsung.com>
Tue, 11 Jun 2013 07:26:42 +0000 (16:26 +0900)
Change-Id: I0a433496f13a1664315e2186402af51e199fab19
Signed-off-by: Choi Munseok <ms47.choi@samsung.com>
src/ui/FUi_ControlManager.cpp
src/ui/FUi_Window.cpp
src/ui/inc/FUi_ControlManager.h

index 2d8ffab..07a6f2e 100644 (file)
@@ -493,20 +493,15 @@ _ControlManager::OpenWindow(_Window& window, bool invalidate)
                __pCurrentFrame = &window;
        }
 
-       result r = ActivateWindow(window);
+       result r = ActivateWindow(window, invalidate);
        SysTryReturn(NID_UI, r != E_INVALID_OPERATION, r, r, "[%s] Propagating.", GetErrorMessage(r));
        SysTryReturn(NID_UI, r == E_SUCCESS, E_SYSTEM, E_SYSTEM, "[E_SYSTEM] System Error.");
 
-       if (invalidate)
-       {
-               window.Invalidate(true);
-       }
-
        return E_SUCCESS;
 }
 
 result
-_ControlManager::ActivateWindow(_Window& window)
+_ControlManager::ActivateWindow(_Window& window, bool invalidate)
 {
        ClearLastResult();
        result r = E_SUCCESS;
@@ -575,6 +570,11 @@ _ControlManager::ActivateWindow(_Window& window)
        r = CallOnPreAttachedToMainTree(window);
        SysTryReturn(NID_UI, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r));
 
+       if (invalidate)
+       {
+               window.Invalidate(true);
+       }
+
        r = CallOnAttachedToMainTree(window);
        SysTryReturn(NID_UI, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r));
 
index 77333cb..90b152d 100644 (file)
@@ -187,15 +187,18 @@ _Window::Open(bool drawAndShow)
        bool visibleState = GetVisibleState();
        if (!__isOpened && visibleState)
        {
+               __isOpened = true;
+               __isInitialized = true;
+               result r = _ControlManager::GetInstance()->OpenWindow(*this, drawAndShow);
+
                if (__type != _WINDOW_TYPE_VE)
                {
                        _EcoreEvas* pEcoreEvas = GetEcoreEvasMgr()->GetEcoreEvas();
                        SysTryReturn(NID_UI, pEcoreEvas, E_SYSTEM, E_SYSTEM, "[E_SYSTEM] A system error occurred.");
                        pEcoreEvas->SetWindowVisibleState(*GetRootWindow(), visibleState);
                }
-               __isOpened = true;
-               __isInitialized = true;
-               return _ControlManager::GetInstance()->OpenWindow(*this, drawAndShow);
+
+               return r;
        }
 
        return E_SUCCESS;
index 06bcc7c..a4b44ef 100644 (file)
@@ -147,7 +147,7 @@ private:
        result MoveWindowAfter(const _Window& targetWindow, const _Window& window);
        result MoveWindowBefore(const _Window& targetWindow, const _Window& window);
 
-       result ActivateWindow(_Window& window);
+       result ActivateWindow(_Window& window, bool invalidate);
 
        result CallOnAttachingToMainTree(_Control& control);
        result CallOnPreAttachedToMainTree(_Control& control);