[dali_2.3.22] Merge branch 'devel/master'
[platform/core/uifw/dali-toolkit.git] / automated-tests / src / dali-toolkit / dali-toolkit-test-utils / dummy-control.cpp
index 7d0c661..56b3b5e 100644 (file)
@@ -268,8 +268,20 @@ void Impl::DummyControl::OnChildRemove(Actor& child) { childRemoveCalled = true;
 void Impl::DummyControl::OnSizeSet(const Vector3& targetSize) { Control::OnSizeSet( targetSize ); sizeSetCalled = true; }
 void Impl::DummyControl::OnSizeAnimation(Animation& animation, const Vector3& targetSize) { Control::OnSizeAnimation( animation, targetSize ); sizeAnimationCalled = true; }
 bool Impl::DummyControl::OnKeyEvent(const KeyEvent& event) { keyEventCalled = true; return false;}
-void Impl::DummyControl::OnKeyInputFocusGained() { keyInputFocusGained = true; }
-void Impl::DummyControl::OnKeyInputFocusLost() { keyInputFocusLost = true; }
+void Impl::DummyControl::OnKeyInputFocusGained()
+{
+  if(this->HasKeyInputFocus())
+  {
+    keyInputFocusGained = true;
+  }
+}
+void Impl::DummyControl::OnKeyInputFocusLost()
+{
+  if(!this->HasKeyInputFocus())
+  {
+    keyInputFocusLost = true;
+  }
+}
 
 void Impl::DummyControl::SetLayout( Property::Index visualIndex, Property::Map& map )
 {