From: minkyu kim Date: Thu, 30 May 2013 12:23:15 +0000 (+0900) Subject: N_SE-39820 : Call SetTouchCanceled, only target is matched X-Git-Tag: accepted/tizen/20130924.144426~1^2~680^2~64 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=402c6d22f86d185ef9e60bda70b5a93cbad5eee0;p=platform%2Fframework%2Fnative%2Fuifw.git N_SE-39820 : Call SetTouchCanceled, only target is matched Change-Id: If55f435abe5a05433201fe89390f3c57afe1fc66 --- diff --git a/src/ui/FUi_Control.cpp b/src/ui/FUi_Control.cpp index aa5a44e..8b3748c 100644 --- a/src/ui/FUi_Control.cpp +++ b/src/ui/FUi_Control.cpp @@ -935,6 +935,17 @@ _Control::OnVisibleStateChanged(void) void _Control::OnAncestorVisibleStateChanged(const _Control& control) { + _TouchManager* pTouchManager = _TouchManager::GetInstance(); + if (pTouchManager) + { + if(pTouchManager->GetTouchControlSource() == this) + { + SysLog(NID_UI, "VisibleState changed false, Call SetTouchCanceled"); + pTouchManager->SetTouchCanceled(null); + pTouchManager->ResetTouchInfo(); + } + } + if (IsVisible() == false) { _Control* pControl = GetFocused(); @@ -3041,10 +3052,10 @@ _Control::SetVisibleState(bool visibleState) if (changed) { GetControlDelegate().OnVisibleStateChanged(); + CallOnAncestorVisibleStateChanged(); _Control* pParent = GetParent(); if (pParent) { - CallOnAncestorVisibleStateChanged(); pParent->GetControlDelegate().OnChildVisibleStateChanged(*this); } diff --git a/src/ui/FUi_ControlImpl.cpp b/src/ui/FUi_ControlImpl.cpp index 37dc4c1..fb1cf93 100644 --- a/src/ui/FUi_ControlImpl.cpp +++ b/src/ui/FUi_ControlImpl.cpp @@ -2756,43 +2756,6 @@ _ControlImpl::OnVisibleStateChanging(void) void _ControlImpl::OnVisibleStateChanged(void) { - _TouchManager* pTouchManager = _TouchManager::GetInstance(); - if (pTouchManager) - { - if ((_TouchManager::GetInstance()->IsTouchAllowed() == true) && (GetPublic().GetShowState() == false)) - { - _ControlManager* pControlManager = _ControlManager::GetInstance(); - SysTryReturnVoidResult(NID_UI, pControlManager, E_SYSTEM, "[E_SYSTEM] _ControlManager does not exist."); - - bool gestureDetecting = false; - - IListT<_TouchGestureDetector*>* pGestureList = GetCore().GetGestureDetectorList(); - if (pGestureList) - { - IEnumeratorT<_TouchGestureDetector*>* pEnumerator = pGestureList->GetEnumeratorN(); - SysTryReturnVoidResult(NID_UI, pEnumerator, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory shortage."); - - while (pEnumerator->MoveNext() == E_SUCCESS) - { - _TouchGestureDetector* pGestureDetector = null; - pEnumerator->GetCurrent(pGestureDetector); - if (pGestureDetector) - { - gestureDetecting = true; - break; - } - } - - delete pEnumerator; - } - - if (!gestureDetecting) - { - pTouchManager->SetTouchCanceled(null); - } - } - } - GetCore().OnVisibleStateChanged(); }