N_SE-39536 : update raise window request
authorYoung Ik Cho <youngik.cho@samsung.com>
Wed, 29 May 2013 10:32:36 +0000 (19:32 +0900)
committerYoung Ik Cho <youngik.cho@samsung.com>
Wed, 29 May 2013 10:32:36 +0000 (19:32 +0900)
Change-Id: Ifb9b0e72fbfeaabb1b49e0d7344a56605b796f2e
Signed-off-by: Young Ik Cho <youngik.cho@samsung.com>
src/app/FApp_UiAppImpl.cpp
src/app/inc/FApp_UiAppImpl.h

index e9cd041..c335b6a 100644 (file)
@@ -101,6 +101,20 @@ _UiAppImpl::OnCreate(void)
 }
 
 
+void
+_UiAppImpl::RaiseFrame(Frame& frame)
+{
+       _FrameImpl* pFrameImpl = _FrameImpl::GetInstance(frame);
+
+       if (pFrameImpl)
+       {
+               // [N_SE-39536] Window raise is requested as synchronous due to B/S issue
+               _EcoreEvas* pEvas = GetEcoreEvasMgr()->GetEcoreEvas();
+               pEvas->ActivateWindow(pFrameImpl->GetCore());
+       }
+}
+
+
 static int
 TransientResponseCb(void* pData)
 {
@@ -171,9 +185,6 @@ _UiAppImpl::OnService(service_s* service, bool initial)
                                        // [FIXME] Multi window handling
                                        if (pFrameImpl != null)
                                        {
-                                               // N_SE-24616, N_SE-24383 for OnForground() and visibility issue
-                                               OnResume();
-
                                                //pEvas->ActivateWindow(pFrameImpl->GetCore());
 
                                                unique_ptr<ArrayList> pEventArgs(new (std::nothrow) ArrayList());
@@ -192,6 +203,9 @@ _UiAppImpl::OnService(service_s* service, bool initial)
 
                                                pString.release();
                                                pEventArgs.release();
+
+                                               // N_SE-24616, N_SE-24383 for OnForground() and visibility issue
+                                               OnResume();
                                        }
                                }
                        }
@@ -241,19 +255,26 @@ _UiAppImpl::OnPause(void)
 }
 
 
-void
-_UiAppImpl::OnDeviceOrientationChanged(app_device_orientation_e orientation)
+result
+_UiAppImpl::OnFrameRaiseRequested(void)
 {
-       SysLog(NID_APP, "System device orientation event.");
+       SysLog(NID_APP, "Frame raise is requested.");
 
-       _ControlImplManager* pControlImplManager = _ControlImplManager::GetInstance();
-       if (pControlImplManager == null)
+       Frame* pFrame = dynamic_cast<Frame*>(__pFrameList->GetAt(0));
+       if (pFrame == null)
+       {
+               SysLog(NID_APP, "No frame is available.");
+               return E_SUCCESS;
+       }
+
+       if (__appUiState == APP_UI_STATE_FOREGROUND)
        {
-               SysLog(NID_APP, "Device orientation event arrived too early.");
-               return;
+               SysLog(NID_APP, "Already foreground state.");
+               return E_SUCCESS;
        }
 
-       pControlImplManager->OnScreenRotated(orientation);
+       RaiseFrame(*pFrame);
+       return E_SUCCESS;
 }
 
 
index 28b71d8..4b927fc 100644 (file)
@@ -23,8 +23,6 @@
 #ifndef _FAPP_INTERNAL_UI_APP_IMPL_H_
 #define _FAPP_INTERNAL_UI_APP_IMPL_H_
 
-#include <app.h>
-
 #include <FAppUiApp.h>
 #include <FBaseRtIEventListener.h>
 
@@ -124,12 +122,9 @@ public:
        virtual void OnTerminate(void);
 
        /**
-        * Called when an orintation event occurs.
-        *
-        * @since 2.1
-        * @param[in]   orientation     The information about the orientation event
+        * Called when the window is requested to be raised
         */
-       virtual void OnDeviceOrientationChanged(app_device_orientation_e orientation);
+       virtual result OnFrameRaiseRequested(void);
 
        /**
         * Called when the application's state changes to Tizen::App::AppState::INITIALIZING. @n
@@ -308,6 +303,11 @@ private:
 
        void OnBackground(void);
 
+       /**
+        * Requests to raise current frame
+        */
+       void RaiseFrame(Tizen::Ui::Controls::Frame& frame);
+
 private:
        static _UiAppImpl* __pUiAppImpl;