// Connect to actor's touched signal
SignalData data;
- TouchEventFunctor functor(data, false /* Do not consume */);
+ TouchEventFunctor functor(data); // consume
actor.TouchedSignal().Connect(&application, functor);
// Connect to parent's touched signal
DALI_TEST_CHECK(parent == interceptData.touchedActor);
DALI_TEST_EQUALS(true, parentData.functorCalled, TEST_LOCATION);
DALI_TEST_EQUALS(PointState::DOWN, parentData.receivedTouch.points[0].state, TEST_LOCATION);
- DALI_TEST_CHECK(parent == parentData.receivedTouch.points[0].hitActor);
+ DALI_TEST_CHECK(actor == parentData.receivedTouch.points[0].hitActor);
DALI_TEST_CHECK(parent == parentData.touchedActor);
data.Reset();
interceptData.Reset();
// geometry
// child -> below
-Dali::Actor EmitGeoInterceptTouchSignals(std::list<Dali::Internal::Actor*>& actorLists, std::list<Dali::Internal::Actor*>& interceptActorList, const Dali::TouchEvent& touchEvent)
+Dali::Actor EmitGeoInterceptTouchSignals(std::list<Dali::Internal::Actor*>& actorLists, std::list<Dali::Internal::Actor*>& interceptActorList, const Dali::TouchEvent& touchEvent, ActorObserver& lastConsumedActor)
{
interceptActorList.clear();
Dali::Actor interceptedActor;
for(auto&& actor : actorLists)
{
+ // If there is a consumed actor, the intercept is sent only up to the moment before the consumed actor.
+ if(lastConsumedActor.GetActor() == actor)
+ {
+ break;
+ }
interceptActorList.push_back(actor);
if(ShouldEmitInterceptTouchEvent(*actor, touchEvent))
{
{
Dali::Actor interceptedActor;
// Let's find out if there is an intercept actor.
- interceptedActor = EmitGeoInterceptTouchSignals(mCandidateActorLists, mInterceptedActorLists, touchEventHandle);
+ interceptedActor = EmitGeoInterceptTouchSignals(mCandidateActorLists, mInterceptedActorLists, touchEventHandle, mLastConsumedActor);
if(interceptedActor)
{
mInterceptedTouchActor.SetActor(&GetImplementation(interceptedActor));