// Change actor to disable user interaction.
actor.SetProperty(DevelActor::Property::USER_INTERACTION_ENABLED, false);
- // Emit a motion signal, signalled with an interrupted
+ // Emit a motion signal, shouldn't receive a signal.
application.ProcessEvent(GenerateSingleTouch(PointState::MOTION, Vector2(200.0f, 200.0f)));
- DALI_TEST_EQUALS(true, data.functorCalled, TEST_LOCATION);
- DALI_TEST_EQUALS(PointState::INTERRUPTED, data.receivedTouch.points[0].state, TEST_LOCATION);
+ DALI_TEST_EQUALS(false, data.functorCalled, TEST_LOCATION);
data.Reset();
END_TEST;
}
// Change actor to disable user interaction.
actor.SetProperty(DevelActor::Property::USER_INTERACTION_ENABLED, false);
- // Emit a motion signal, signalled with an interrupted
+ // Emit a motion signal, shouldn't receive a signal.
application.ProcessEvent(GenerateSingleTouch(PointState::MOTION, Vector2(200.0f, 200.0f)));
- DALI_TEST_EQUALS(true, data.functorCalled, TEST_LOCATION);
- DALI_TEST_EQUALS(PointState::INTERRUPTED, data.receivedTouch.points[0].state, TEST_LOCATION);
+ DALI_TEST_EQUALS(false, data.functorCalled, TEST_LOCATION);
data.Reset();
END_TEST;
}
bool ShouldEmitInterceptTouchEvent(const Actor& actorImpl, const Dali::TouchEvent& event)
{
PointState::Type state = event.GetState(0);
- return actorImpl.GetInterceptTouchRequired() && (state != PointState::MOTION || actorImpl.IsDispatchTouchMotion());
+ return actorImpl.GetInterceptTouchRequired() && actorImpl.IsUserInteractionEnabled() && (state != PointState::MOTION || actorImpl.IsDispatchTouchMotion());
}
bool ShouldEmitTouchEvent(const Actor& actorImpl, const Dali::TouchEvent& event)
{
PointState::Type state = event.GetState(0);
- return actorImpl.GetTouchRequired() && (state != PointState::MOTION || actorImpl.IsDispatchTouchMotion());
+ return actorImpl.GetTouchRequired() && actorImpl.IsUserInteractionEnabled() && (state != PointState::MOTION || actorImpl.IsDispatchTouchMotion());
}
// child -> parent