- // We should find it among the actors nearby.
- Integration::SceneHolder window = Integration::SceneHolder::Get(currentFocusActor);
- if(window)
+ Actor rootActor = mFocusFinderRootActor.GetHandle();
+ if(!rootActor)
+ {
+ if (currentFocusActor)
+ {
+ // Find the window of the focused actor.
+ Integration::SceneHolder window = Integration::SceneHolder::Get(currentFocusActor);
+ if (window)
+ {
+ rootActor = window.GetRootLayer();
+ }
+ }
+ else
+ {
+ // Searches from the currently focused window.
+ rootActor = mCurrentFocusedWindow.GetHandle();
+ }
+ }
+ if(rootActor)