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();
if (changed)
{
GetControlDelegate().OnVisibleStateChanged();
+ CallOnAncestorVisibleStateChanged();
_Control* pParent = GetParent();
if (pParent)
{
- CallOnAncestorVisibleStateChanged();
pParent->GetControlDelegate().OnChildVisibleStateChanged(*this);
}
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();
}