From: joogab.yun Date: Wed, 25 May 2022 05:15:23 +0000 (+0900) Subject: The FocusChanged event callback is called before the FocusLost and FocusGained event... X-Git-Tag: dali_2.1.24~4 X-Git-Url: http://review.tizen.org/git/?p=platform%2Fcore%2Fuifw%2Fdali-toolkit.git;a=commitdiff_plain;h=1a883892808e85ce89e93764f680e115ee465bc6 The FocusChanged event callback is called before the FocusLost and FocusGained event callbacks. Change-Id: Idb145bdd0f9f74e84287ab783a34a72485667ae8 --- 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 c65abbb..4383c1a 100644 --- a/dali-toolkit/internal/focus-manager/keyboard-focus-manager-impl.cpp +++ b/dali-toolkit/internal/focus-manager/keyboard-focus-manager-impl.cpp @@ -271,6 +271,12 @@ bool KeyboardFocusManager::DoSetCurrentFocusActor(Actor actor) mCurrentFocusActors.push_back(std::pair, WeakHandle >(mCurrentFocusedWindow, actor)); } + // Send notification for the change of focus actor + if(!mFocusChangedSignal.Empty()) + { + mFocusChangedSignal.Emit(currentFocusedActor, actor); + } + Toolkit::Control newlyFocusedControl = Toolkit::Control::DownCast(actor); if(newlyFocusedControl) { @@ -288,11 +294,6 @@ bool KeyboardFocusManager::DoSetCurrentFocusActor(Actor actor) mFocusHistory.erase(beginPos); } - // Send notification for the change of focus actor - if(!mFocusChangedSignal.Empty()) - { - mFocusChangedSignal.Emit(currentFocusedActor, actor); - } DALI_LOG_INFO(gLogFilter, Debug::General, "[%s:%d] SUCCEED\n", __FUNCTION__, __LINE__); success = true; }