__layout = _ControlManager::GetInstance()->GetOrientation();
#endif
- if (GetOwner() == null)
+ _Control* pOwner = GetOwner();
+ if (pOwner == null)
{
_Frame* pFrame = dynamic_cast<_Frame*>(_ControlManager::GetInstance()->GetCurrentFrame());
SysTryReturn(NID_UI_CTRL, pFrame != null, E_SYSTEM, E_SYSTEM, "[E_SYSTEM] Current frame instance is not available.");
#endif
GET_SHAPE_CONFIG(CONTEXTMENU::ITEM_MAX_COUNT, __layout, __showItemMaxCount);
}
-
- _Control* pOwner = GetOwner();
- if (pOwner != null && __isAttachedToMainTree == false)
+ else if (pOwner != null && __isAttachedToMainTree == false)
{
pOwner->LockInputEvent();
}
, _pComposedBgBitmap(null)
, _pOutlineBitmap(null)
, _pTitleTextAccessibilityElement(null)
+ , _isAttachedToMainTree(false)
, __pPopupPresenter(null)
, __bounds(0.0f, 0.0f, 0.0f, 0.0f)
, __popupResult(POPUP_RESULT_NONE)
_Popup::~_Popup(void)
{
_Control* pOwner = GetOwner();
- if (pOwner != null)
+ if (_isAttachedToMainTree == true && pOwner != null)
{
pOwner->UnlockInputEvent();
}
SetTouchCapture(false, false);
}
- if (GetOwner() == null)
+ _Control* pOwner = GetOwner();
+ if (pOwner == null)
{
_Frame* pFrame = dynamic_cast<_Frame*>(_ControlManager::GetInstance()->GetCurrentFrame());
SysTryReturnVoidResult(NID_UI_CTRL, pFrame != null, E_SYSTEM, "[E_SYSTEM] This instance is not constructed.");
SetOwner(pFrame);
}
}
+ else if (pOwner != null && _isAttachedToMainTree == false)
+ {
+ pOwner->LockInputEvent();
+ }
+
+ _isAttachedToMainTree = true;
_Window::OnActivated();
}
pOwner->UnlockInputEvent();
}
+ _isAttachedToMainTree = false;
+
ReleaseTouchCapture();
_Window::OnDeactivated();
SetTouchCapture(false, false);
}
- if (GetOwner() == null)
+ _Control* pOwner = GetOwner();
+ if (pOwner == null)
{
_Frame* pFrame = dynamic_cast<_Frame*>(_ControlManager::GetInstance()->GetCurrentFrame());
SysTryReturnVoidResult(NID_UI_CTRL, pFrame != null, E_SYSTEM, "[E_SYSTEM] This instance is not constructed.");
SetOwner(pFrame);
}
}
+ else if (pOwner != null && _isAttachedToMainTree == false)
+ {
+ pOwner->LockInputEvent();
+ }
+
+ _isAttachedToMainTree = true;
if (__isTransparent)
{