_Control* pFocusTraversalControl = pTop->GetFocusTraversalControl(this);
if ((&control) == pFocusTraversalControl)
{
- pTop->SetFocusTraversalControl(this);
+ pTop->SetFocusTraversalControl(&control, false);
}
}
_Control* pChild = null;
_Control::ControlList& children = control.GetChildList();
+ _Window* pTop = control.GetRootWindow();
+ if (pTop)
+ {
+ _Control* pControl = pTop->GetFocusControl(&control);
+ if ((&control) == pControl)
+ {
+ pTop->SetFocusControl(&control, false);
+ }
+ _Control* pFocusTraversalControl = pTop->GetFocusTraversalControl(&control);
+ if ((&control) == pFocusTraversalControl)
+ {
+ pTop->SetFocusTraversalControl(&control, false);
+ }
+ }
+
r = control.GetControlDelegate().OnDetachingFromMainTree();
SysTryReturn(NID_UI, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r));
else
{
_Control* pTraversalControl = FindTraversalControlFromChild(pControl);
- pTop->SetFocusTraversalControl(pTraversalControl);
+ pTop->SetFocusTraversalControl(pTraversalControl, true);
}
{
if (IsFocusControlListControl(pControl))
{
- pTop->SetFocusTraversalControl(pControl);
+ pTop->SetFocusTraversalControl(pControl, true);
}
pControl->DrawFocus();
return;
{
pFocusControl->SetFocused();
pFocusControl->DrawFocus();
- pTop->SetFocusTraversalControl(pFocusControl);
+ pTop->SetFocusTraversalControl(pFocusControl, true);
return;
}
}
{
pFocusControl->SetFocused();
pFocusControl->DrawFocus();
- pTop->SetFocusTraversalControl(pFocusControl);
+ pTop->SetFocusTraversalControl(pFocusControl, true);
return;
}
}
index ++;
}
- pTop->SetFocusTraversalControl(pNextFocusControl);
+ pTop->SetFocusTraversalControl(pNextFocusControl, true);
if (pNextFocusControl && findNextFocusControl == true)
{
_Control* pParentControl = pNextFocusControl->GetParent();
{
return __pFocusTraversalControl;
}
+
void
-_Window::SetFocusTraversalControl(_Control* pControl)
+_Window::SetFocusTraversalControl(_Control* pControl, bool on)
{
- __pFocusTraversalControl = pControl;
+ if (on)
+ {
+ __pFocusTraversalControl = pControl;
+ }
+ else
+ {
+ __pFocusTraversalControl = this;
+ }
}
void
}
void
-_Frame::SetFocusTraversalControl(_Control* pControl)
+_Frame::SetFocusTraversalControl(_Control* pControl, bool on)
{
_Form* pForm = null;
_Control* pTempControl = pControl;
if (pForm)
{
- pForm->SetFocusTraversalControl(pControl);
+ if (on)
+ {
+ pForm->SetFocusTraversalControl(pControl);
+ }
+ else
+ {
+ pForm->SetFocusTraversalControl(pForm);
+ }
}
}
}}} // Tizen::Ui::Controls
if (pFocusControl != null)
{
- pTop->SetFocusTraversalControl(pFocusControl);
+ pTop->SetFocusTraversalControl(pFocusControl, true);
_Control* pParentControl = pFocusControl->GetParent();
if (pParentControl != null)
virtual void ResetFocusList(void);
virtual Tizen::Base::Collection::IListT<_Control*>* GetFocusList(void) const;
virtual _Control* GetFocusTraversalControl(_Control* pControl) const;
- virtual void SetFocusTraversalControl(_Control* pControl);
+ virtual void SetFocusTraversalControl(_Control* pControl, bool on);
// Focus
virtual _Control* GetFocusControl(const _Control* pControl) const;
virtual Tizen::Base::Collection::IListT<_Control*>* GetFocusList(void) const;
virtual void ResetFocusList(void);
virtual _Control* GetFocusTraversalControl(_Control* pControl) const;
- virtual void SetFocusTraversalControl(_Control* pControl);
+ virtual void SetFocusTraversalControl(_Control* pControl, bool on);
// Dimming
result SetDimmingEnabled(bool enabled);