From: Kimmo Hoikka Date: Mon, 9 Nov 2015 16:37:02 +0000 (-0800) Subject: Merge "Automatic image atlasing" into devel/master X-Git-Tag: dali_1.1.10~9 X-Git-Url: http://review.tizen.org/git/?p=platform%2Fcore%2Fuifw%2Fdali-toolkit.git;a=commitdiff_plain;h=f3c7e52f300fc2f6d07bcbd75ad3b992e19083f5;hp=4c6d34154c81cf86b4c3662b81e1223f3326ceb5 Merge "Automatic image atlasing" into devel/master --- 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 4e57496..ae7d741 100644 --- a/dali-toolkit/internal/focus-manager/keyboard-focus-manager-impl.cpp +++ b/dali-toolkit/internal/focus-manager/keyboard-focus-manager-impl.cpp @@ -132,9 +132,9 @@ bool KeyboardFocusManager::SetCurrentFocusActor(Actor actor) { DALI_ASSERT_DEBUG( !mIsWaitingKeyboardFocusChangeCommit && "Calling this function in the PreFocusChangeSignal callback?" ); - if(actor) + if( actor ) { - return DoSetCurrentFocusActor(actor.GetId()); + return DoSetCurrentFocusActor( actor.GetId() ); } return false; @@ -695,8 +695,12 @@ void KeyboardFocusManager::OnKeyEvent(const KeyEvent& event) void KeyboardFocusManager::OnTouched(const TouchEvent& touchEvent) { - // Clear the focus when user touch the screen - ClearFocus(); + // Clear the focus when user touch the screen. + // We only do this on a Down event, otherwise the clear action may override a manually focused actor. + if( ( touchEvent.GetPointCount() < 1 ) || ( touchEvent.GetPoint( 0 ).state == TouchPoint::Down ) ) + { + ClearFocus(); + } } Toolkit::KeyboardFocusManager::PreFocusChangeSignalType& KeyboardFocusManager::PreFocusChangeSignal()