- // Notify the control that it has lost key input focus
- control.GetImplementation().OnKeyInputFocusLost();
-
- if(pos == mFocusActorsQueue.begin())
- {
- Actor previousFocusActor;
-
- mFocusActorsQueue.erase(pos);
- if(!mFocusActorsQueue.empty())
- {
- previousFocusActor = Stage::GetCurrent().GetRootLayer().FindChildById(mFocusActorsQueue.front());
- }
-
- Dali::Toolkit::Control previouscontrol = Dali::Toolkit::Control::DownCast(previousFocusActor);
- if(previouscontrol)
- {
- // Tell the new actor that it has gained focus.
- previouscontrol.GetImplementation().OnKeyInputFocusGained();
- }
- }
- else
- {
- //If the removed actor is not currently focused, then no need to emit signal.
- mFocusActorsQueue.erase(pos);
- }
-
- }