From: Hermet Park Date: Wed, 12 Oct 2016 12:00:45 +0000 (+0900) Subject: UiPopup: fix some minor behaviors. X-Git-Tag: submit/tizen/20161013.034343^2 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=4d9f7b75d37fd9b19ddb39a41cffd6c837e68772;p=platform%2Fcore%2Fuifw%2Fui-viewmgr.git UiPopup: fix some minor behaviors. 1. popup shouldn't be activated if the view is not activated. 2. deactivate() returns an error if the popup state is not activated. Change-Id: Ieb56a5152c96c56ab7fb646b2ab14d4981ace4fd --- diff --git a/src/lib/efl/mobile/UiPopup.cpp b/src/lib/efl/mobile/UiPopup.cpp index aa0734d..5960e40 100644 --- a/src/lib/efl/mobile/UiPopup.cpp +++ b/src/lib/efl/mobile/UiPopup.cpp @@ -21,6 +21,9 @@ using namespace efl_viewmanager; static int _updatePopup(UiPopup *popup) { + if (popup->getView()->getState() != UI_VIEW_STATE_ACTIVATE) + return TIZEN_ERROR_NOT_PERMITTED; + Elm_Win *win = popup->getBase(); if (!win) return TIZEN_ERROR_NOT_PERMITTED; @@ -69,6 +72,9 @@ Elm_Win *UiPopup::getWindow() int UiPopup::deactivate() { + if (this->isActivated() == false) + return TIZEN_ERROR_NOT_PERMITTED; + Elm_Popup *popup = this->getContent(); if (!popup) { LOGE("Content is not set! = UiPopup(%p)", this);