DALI_TEST_EQUALS(true, data.functorCalled, TEST_LOCATION);
DALI_TEST_EQUALS(true, rootData.functorCalled, TEST_LOCATION);
DALI_TEST_EQUALS(PointState::LEAVE, data.hoverEvent.GetState(0), TEST_LOCATION);
- DALI_TEST_EQUALS(PointState::LEAVE, rootData.hoverEvent.GetState(0), TEST_LOCATION);
+ // rootActor receives "started" state because a new hover event entered in rootActor area.
+ DALI_TEST_EQUALS(PointState::STARTED, rootData.hoverEvent.GetState(0), TEST_LOCATION);
DALI_TEST_CHECK(actor == data.hoverEvent.GetHitActor(0));
- DALI_TEST_CHECK(actor == rootData.hoverEvent.GetHitActor(0));
+ DALI_TEST_CHECK(rootActor == rootData.hoverEvent.GetHitActor(0));
data.Reset();
rootData.Reset();
else
{
// If the actor is hit first, the hover is started.
- if(hitActor && processor.mLastPrimaryHitActor.GetActor() != hitActor && localVars.primaryPointState == PointState::MOTION)
+ if(hitActor && processor.mLastPrimaryHitActor.GetActor() != hitActor &&
+ localVars.primaryPointState == PointState::MOTION && GetImplementation(hitActor).GetLeaveRequired())
{
- Actor* hitActorImpl = &GetImplementation(hitActor);
- if(hitActorImpl->GetLeaveRequired())
- {
+ // A leave event is sent to the previous actor first.
+ localVars.lastPrimaryHitActor = processor.mLastPrimaryHitActor.GetActor();
+ localVars.lastConsumedActor = processor.mLastConsumedActor.GetActor();
+ Impl::DeliverLeaveEvent(processor, localVars);
+
localVars.hoverEvent->GetPoint(0).SetState(PointState::STARTED);
- }
+ localVars.primaryPointState = PointState::STARTED;
+
+ // It sends a started event and updates information.
+ localVars.consumedActor = EmitHoverSignals(hitActor, localVars.hoverEventHandle);
+ UpdateMembersWithCurrentHitInformation(processor, localVars);
+ }
+ else
+ {
+ localVars.consumedActor = EmitHoverSignals(hitActor, localVars.hoverEventHandle);
}
- localVars.consumedActor = EmitHoverSignals(hitActor, localVars.hoverEventHandle);
}
if(localVars.hoverEvent->GetPoint(0).GetState() != PointState::MOTION)