Changed GetNearestFocusableActor interface to receive rootActor
[platform/core/uifw/dali-toolkit.git] / dali-toolkit / internal / focus-manager / keyboard-focus-manager-impl.cpp
index 745da15..8c737d2 100644 (file)
@@ -517,7 +517,11 @@ bool KeyboardFocusManager::MoveFocus(Toolkit::Control::KeyboardFocus::Direction
       else if(mEnableDefaultAlgorithm)
       {
         // We should find it among the actors nearby.
       else if(mEnableDefaultAlgorithm)
       {
         // We should find it among the actors nearby.
-        nextFocusableActor = Toolkit::FocusFinder::GetNearestFocusableActor(currentFocusActor, direction);
+        Integration::SceneHolder window = Integration::SceneHolder::Get(currentFocusActor);
+        if(window)
+        {
+          nextFocusableActor = Toolkit::FocusFinder::GetNearestFocusableActor(window.GetRootLayer(), currentFocusActor, direction);
+        }
       }
     }
 
       }
     }