add patch
[framework/osp/web.git] / src / controls / FWebCtrl_WebPopup.cpp
old mode 100644 (file)
new mode 100755 (executable)
index 1c35aab..e1ca104
@@ -25,6 +25,7 @@
 #include <FUiCtrlPanel.h>
 #include <FUiVerticalBoxLayout.h>
 #include <FUi_ResourceManager.h>
+#include "FWebCtrl_WebManager.h"
 #include "FWebCtrl_WebPopup.h"
 
 
@@ -50,11 +51,10 @@ _WebPopup::_WebPopup(void)
 
 _WebPopup::~_WebPopup(void)
 {
-       if (IsModalPopup() == true)
+       if (IsModalPopup())
        {
-               HidePopup(0);
+               HidePopup();
        }
-
        __pWebPopupData.reset();
 }
 
@@ -104,6 +104,9 @@ _WebPopup::ShowPopup(void)
 {
        result r = E_SUCCESS;
 
+       _WebManager* pWebManager = _WebManager::GetInstance();
+       pWebManager->SetActivePopup(this);
+
        r = SetShowState(true);
        SysTryReturn(NID_WEB_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r));
 
@@ -122,6 +125,9 @@ _WebPopup::HidePopup(int modalResult)
        r = SetShowState(false);
        SysTryReturn(NID_WEB_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r));
 
+       _WebManager* pWebManager = _WebManager::GetInstance();
+       pWebManager->RemoveActivePopup(this);
+
        if (__isModal)
        {
                __modal = modalResult;
@@ -137,6 +143,9 @@ _WebPopup::HidePopup(int modalResult)
 result
 _WebPopup::ShowAndWait(int& modalResult)
 {
+       _WebManager* pWebManager = _WebManager::GetInstance();
+       pWebManager->SetActivePopup(this);
+
        __isModal = true;
 
        return DoModal(modalResult);
@@ -247,4 +256,11 @@ _WebPopup::GetPopupData(bool refresh)
 }
 
 
+result
+_WebPopup::OnTerminating(void)
+{
+       return E_SUCCESS;
+}
+
+
 }}} // Tizen::Web::Controls