Remove useless warning message for initialized window 65/288365/2
authorEunki Hong <eunkiki.hong@samsung.com>
Wed, 15 Feb 2023 17:35:27 +0000 (02:35 +0900)
committerEunki Hong <eunkiki.hong@samsung.com>
Tue, 21 Feb 2023 01:13:48 +0000 (10:13 +0900)
OnWindowFocusChanged can be called when the window is created.
In that case, GetFocusActorFromCurrentWindow() will return empty Actor handle.

SetCurrentFocusActor() doesn't consider empty-handle input case. So we should skip
if GetFocusActorFromCurrentWindow() returns empty handle.

Change-Id: I440e60f7c46e234876a4d5af50445477b88e35f7
Signed-off-by: Eunki Hong <eunkiki.hong@samsung.com>
dali-toolkit/internal/focus-manager/keyboard-focus-manager-impl.cpp

index 707aa68..cb3eeec 100644 (file)
@@ -1097,13 +1097,16 @@ void KeyboardFocusManager::OnWindowFocusChanged(Window window, bool focusIn)
 
     // Get Current Focused Actor from window
     Actor currentFocusedActor = GetFocusActorFromCurrentWindow();
 
     // Get Current Focused Actor from window
     Actor currentFocusedActor = GetFocusActorFromCurrentWindow();
-    SetCurrentFocusActor(currentFocusedActor);
-
-    if(currentFocusedActor && (mEnableFocusIndicator == ENABLE))
+    if(currentFocusedActor)
     {
     {
-      // Make sure the focused actor is highlighted
-      currentFocusedActor.Add(GetFocusIndicatorActor());
-      mIsFocusIndicatorShown = SHOW;
+      SetCurrentFocusActor(currentFocusedActor);
+
+      if(mEnableFocusIndicator == ENABLE)
+      {
+        // Make sure the focused actor is highlighted
+        currentFocusedActor.Add(GetFocusIndicatorActor());
+        mIsFocusIndicatorShown = SHOW;
+      }
     }
   }
 }
     }
   }
 }