From: joogab yun Date: Tue, 18 Jun 2024 07:47:36 +0000 (+0000) Subject: Merge "If USER_INTERACTION_ENABLED is false, actor should not receive events." into... X-Git-Tag: dali_2.3.29~4 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=6704cfd096a9229fa1025d52a544d219cd53bd2d;hp=a3a9c5464b8da456361832f26ee314e85684d0d1;p=platform%2Fcore%2Fuifw%2Fdali-core.git Merge "If USER_INTERACTION_ENABLED is false, actor should not receive events." into devel/master --- diff --git a/automated-tests/src/dali/utc-Dali-GeoTouchProcessing.cpp b/automated-tests/src/dali/utc-Dali-GeoTouchProcessing.cpp index 40f4afcb0..4ab68a728 100644 --- a/automated-tests/src/dali/utc-Dali-GeoTouchProcessing.cpp +++ b/automated-tests/src/dali/utc-Dali-GeoTouchProcessing.cpp @@ -892,10 +892,9 @@ int UtcDaliGeoTouchEventActorBecomesUserInteractionDisabled(void) // 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; } diff --git a/automated-tests/src/dali/utc-Dali-TouchProcessing.cpp b/automated-tests/src/dali/utc-Dali-TouchProcessing.cpp index 8b6838306..b0a1fc6b2 100644 --- a/automated-tests/src/dali/utc-Dali-TouchProcessing.cpp +++ b/automated-tests/src/dali/utc-Dali-TouchProcessing.cpp @@ -991,10 +991,9 @@ int UtcDaliTouchEventActorBecomesUserInteractionDisabled(void) // 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; } diff --git a/dali/internal/event/events/touch-event-processor.cpp b/dali/internal/event/events/touch-event-processor.cpp index 0ead0f9e6..21a41d8a0 100644 --- a/dali/internal/event/events/touch-event-processor.cpp +++ b/dali/internal/event/events/touch-event-processor.cpp @@ -83,13 +83,13 @@ const char* TOUCH_POINT_STATE[6] = 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