Changes after touch consumed behaviour change
[platform/core/uifw/dali-toolkit.git] / dali-toolkit / internal / controls / buttons / button-impl.cpp
index 0305e8a..40aa60c 100644 (file)
@@ -630,11 +630,7 @@ bool Button::OnAccessibilityActivated()
 
 bool Button::OnTouch( Actor actor, const TouchData& touch )
 {
-
-  // Only events are processed when the button is not disabled
-  auto result( false );
-
-  if( !IsDisabled() )
+  if( !IsDisabled() && (actor == touch.GetHitActor(0)) )
   {
     if ( 1 == touch.GetPointCount() )
     {
@@ -675,9 +671,8 @@ bool Button::OnTouch( Actor actor, const TouchData& touch )
       // Sets the button state to the default
       mButtonPressedState = UNPRESSED;
     }
-    result = true;
   }
-  return result;
+  return false;
 }
 
 bool Button::OnKeyboardEnter()