From 2de119eaa5b2c3947dddc35ee2621fe119e72cc0 Mon Sep 17 00:00:00 2001 From: "joogab.yun" Date: Tue, 14 Jun 2022 14:37:42 +0900 Subject: [PATCH] The FocusChanged event callback is called before the FocusLost Change-Id: I131c7e32a4372b54b2b57c5acf53bfdc5a82c15a --- .../focus-manager/keyboard-focus-manager-impl.cpp | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/dali-toolkit/internal/focus-manager/keyboard-focus-manager-impl.cpp b/dali-toolkit/internal/focus-manager/keyboard-focus-manager-impl.cpp index 20186ef..3df6d4b 100644 --- a/dali-toolkit/internal/focus-manager/keyboard-focus-manager-impl.cpp +++ b/dali-toolkit/internal/focus-manager/keyboard-focus-manager-impl.cpp @@ -246,14 +246,6 @@ bool KeyboardFocusManager::DoSetCurrentFocusActor(Actor actor) actor.Add(GetFocusIndicatorActor()); } - Toolkit::Control currentlyFocusedControl = Toolkit::Control::DownCast(currentFocusedActor); - if(currentlyFocusedControl) - { - // Do we need it to remember if it was previously DISABLED? - currentlyFocusedControl.SetProperty(DevelControl::Property::STATE, DevelControl::NORMAL); - currentlyFocusedControl.ClearKeyInputFocus(); - } - // Save the current focused actor mCurrentFocusActor = actor; @@ -279,6 +271,14 @@ bool KeyboardFocusManager::DoSetCurrentFocusActor(Actor actor) mFocusChangedSignal.Emit(currentFocusedActor, actor); } + Toolkit::Control currentlyFocusedControl = Toolkit::Control::DownCast(currentFocusedActor); + if(currentlyFocusedControl) + { + // Do we need it to remember if it was previously DISABLED? + currentlyFocusedControl.SetProperty(DevelControl::Property::STATE, DevelControl::NORMAL); + currentlyFocusedControl.ClearKeyInputFocus(); + } + Toolkit::Control newlyFocusedControl = Toolkit::Control::DownCast(actor); if(newlyFocusedControl) { -- 2.7.4