From: minkyu kim Date: Tue, 4 Jun 2013 06:48:30 +0000 (+0900) Subject: sync to tizen_2.1 : N_SE-39820 : Call SetTouchCanceled, only target is matched X-Git-Tag: submit/tizen_2.2/20130714.153149~637^2 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=f2728fdc4a6f5cbbe77e0a043cb510e8892bbfdc;p=framework%2Fosp%2Fuifw.git sync to tizen_2.1 : N_SE-39820 : Call SetTouchCanceled, only target is matched Change-Id: I32087e0d0485cc3c832f4daa9142dd58a5023cd9 --- 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(); }