From 4d9f7b75d37fd9b19ddb39a41cffd6c837e68772 Mon Sep 17 00:00:00 2001 From: Hermet Park Date: Wed, 12 Oct 2016 21:00:45 +0900 Subject: [PATCH] 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 --- src/lib/efl/mobile/UiPopup.cpp | 6 ++++++ 1 file changed, 6 insertions(+) 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); -- 2.34.1