check control's validity after calling public propagated listener, change touch cance...
authorminkyu kim <imetjade.kim@samsung.com>
Fri, 7 Jun 2013 06:55:19 +0000 (15:55 +0900)
committerminkyu kim <imetjade.kim@samsung.com>
Fri, 7 Jun 2013 06:55:19 +0000 (15:55 +0900)
Change-Id: If090a2228b380d17c026c0ead5889856b14107d1

src/ui/FUi_Control.cpp
src/ui/FUi_ControlImpl.cpp

index 8c90a0d..75a0ee0 100644 (file)
@@ -937,7 +937,7 @@ void
 _Control::OnAncestorVisibleStateChanged(const _Control& control)
 {
        _TouchManager* pTouchManager = _TouchManager::GetInstance();
-       if (pTouchManager)
+       if (pTouchManager && IsVisible() == false)
        {
                if(pTouchManager->GetTouchControlSource() == this)
                {
index 0049430..7bee7a3 100644 (file)
@@ -1362,6 +1362,8 @@ public:
 
                        Control& control = static_cast<Control&>(pControlImpl->GetPublic());
 
+                       const _ControlHandle controlHandle = pControlImpl->GetCore().GetHandle();
+
                        TouchEventInfo publicTouchInfo;
 
                        _TouchEventArg* pEventArg = GetTouchEventArgN(touchInfo);
@@ -1380,6 +1382,9 @@ public:
                        {
                                return true;
                        }
+
+                       _Control* pControl = _ControlManager::GetInstance()->GetObject(controlHandle);
+                       SysTryReturn(NID_UI, pControl, true, E_OBJ_NOT_FOUND, "[E_OBJ_NOT_FOUND] Target control is deleted.");
                }
 
                return __impl.CallOnTouchPressed(source, touchInfo);
@@ -1396,6 +1401,8 @@ public:
 
                        Control& control = static_cast<Control&>(pControlImpl->GetPublic());
 
+                       const _ControlHandle controlHandle = pControlImpl->GetCore().GetHandle();
+
                        TouchEventInfo publicTouchInfo;
 
                        _TouchEventArg* pEventArg = GetTouchEventArgN(touchInfo);
@@ -1414,6 +1421,9 @@ public:
                        {
                                return true;
                        }
+
+                       _Control* pControl = _ControlManager::GetInstance()->GetObject(controlHandle);
+                       SysTryReturn(NID_UI, pControl, true, E_OBJ_NOT_FOUND, "[E_OBJ_NOT_FOUND] Target control is deleted.");
                }
 
                return __impl.CallOnTouchReleased(source, touchInfo);
@@ -1430,6 +1440,8 @@ public:
 
                        Control& control = static_cast<Control&>(pControlImpl->GetPublic());
 
+                       const _ControlHandle controlHandle = pControlImpl->GetCore().GetHandle();
+
                                TouchEventInfo publicTouchInfo;
 
                                _TouchEventArg* pEventArg = GetTouchEventArgN(touchInfo);
@@ -1448,6 +1460,9 @@ public:
                                {
                                        return true;
                                }
+
+                       _Control* pControl = _ControlManager::GetInstance()->GetObject(controlHandle);
+                       SysTryReturn(NID_UI, pControl, true, E_OBJ_NOT_FOUND, "[E_OBJ_NOT_FOUND] Target control is deleted.");
                        }
 
                return __impl.CallOnTouchMoved(source, touchInfo);
@@ -1464,6 +1479,8 @@ public:
 
                        Control& control = static_cast<Control&>(pControlImpl->GetPublic());
 
+                       const _ControlHandle controlHandle = pControlImpl->GetCore().GetHandle();
+
                                TouchEventInfo publicTouchInfo;
 
                                _TouchEventArg* pEventArg = GetTouchEventArgN(touchInfo);
@@ -1482,6 +1499,9 @@ public:
                                {
                                        return true;
                                }
+
+                       _Control* pControl = _ControlManager::GetInstance()->GetObject(controlHandle);
+                       SysTryReturn(NID_UI, pControl, true, E_OBJ_NOT_FOUND, "[E_OBJ_NOT_FOUND] Target control is deleted.");
                        }
 
                return __impl.CallOnTouchCanceled(source, touchInfo);
@@ -1498,6 +1518,8 @@ public:
 
                        Control& control = static_cast<Control&>(pControlImpl->GetPublic());
 
+                       const _ControlHandle controlHandle = pControlImpl->GetCore().GetHandle();
+
                        TouchEventInfo publicTouchInfo;
 
                        _TouchEventArg* pEventArg = GetTouchEventArgN(touchInfo);
@@ -1515,6 +1537,9 @@ public:
                        {
                                return _UI_TOUCH_EVENT_DELIVERY_NO;
                        }
+
+                       _Control* pControl = _ControlManager::GetInstance()->GetObject(controlHandle);
+                       SysTryReturn(NID_UI, pControl, _UI_TOUCH_EVENT_DELIVERY_NO, E_OBJ_NOT_FOUND, "[E_OBJ_NOT_FOUND] Target control is deleted.");
                }
 
                // 3. Impl
@@ -1541,6 +1566,8 @@ public:
 
                        Control& control = static_cast<Control&>(pControlImpl->GetPublic());
 
+                       const _ControlHandle controlHandle = pControlImpl->GetCore().GetHandle();
+
                        TouchEventInfo publicTouchInfo;
 
                        _TouchEventArg* pEventArg = GetTouchEventArgN(touchInfo);
@@ -1558,6 +1585,9 @@ public:
                        {
                                return _UI_TOUCH_EVENT_DELIVERY_NO;
                        }
+
+                       _Control* pControl = _ControlManager::GetInstance()->GetObject(controlHandle);
+                       SysTryReturn(NID_UI, pControl, _UI_TOUCH_EVENT_DELIVERY_NO, E_OBJ_NOT_FOUND, "[E_OBJ_NOT_FOUND] Target control is deleted.");
                }
 
                // 3. Impl
@@ -1584,6 +1614,8 @@ public:
 
                        Control& control = static_cast<Control&>(pControlImpl->GetPublic());
 
+                       const _ControlHandle controlHandle = pControlImpl->GetCore().GetHandle();
+
                        TouchEventInfo publicTouchInfo;
 
                        _TouchEventArg* pEventArg = GetTouchEventArgN(touchInfo);
@@ -1601,6 +1633,9 @@ public:
                        {
                                return _UI_TOUCH_EVENT_DELIVERY_NO;
                        }
+
+                       _Control* pControl = _ControlManager::GetInstance()->GetObject(controlHandle);
+                       SysTryReturn(NID_UI, pControl, _UI_TOUCH_EVENT_DELIVERY_NO, E_OBJ_NOT_FOUND, "[E_OBJ_NOT_FOUND] Target control is deleted.");
                }
 
                // 3. Impl