[Tizen] If Hittable is false, actor should not receive events except INTERRUPTED 00/313200/1
authorjoogab.yun <joogab.yun@samsung.com>
Thu, 20 Jun 2024 01:02:48 +0000 (10:02 +0900)
committerjoogab.yun <joogab.yun@samsung.com>
Thu, 20 Jun 2024 05:04:09 +0000 (14:04 +0900)
Change-Id: I6f782f0e3021ea1d3bcc8a9ce630956bd2128fda

automated-tests/src/dali/utc-Dali-GeoTouchProcessing.cpp
automated-tests/src/dali/utc-Dali-TouchProcessing.cpp
dali/internal/event/events/touch-event-processor.cpp

index 0e3d525..0e0793f 100644 (file)
@@ -892,9 +892,10 @@ int UtcDaliGeoTouchEventActorBecomesUserInteractionDisabled(void)
   // Change actor to disable user interaction.
   actor.SetProperty(DevelActor::Property::USER_INTERACTION_ENABLED, false);
 
-  // Emit a motion signal, shouldn't receive a signal.
+  // Emit a motion signal, signalled with an interrupted
   application.ProcessEvent(GenerateSingleTouch(PointState::MOTION, Vector2(200.0f, 200.0f)));
-  DALI_TEST_EQUALS(false, data.functorCalled, TEST_LOCATION);
+  DALI_TEST_EQUALS(true, data.functorCalled, TEST_LOCATION);
+  DALI_TEST_EQUALS(PointState::INTERRUPTED, data.receivedTouch.points[0].state, TEST_LOCATION);
   data.Reset();
   END_TEST;
 }
index b0a1fc6..8b68383 100644 (file)
@@ -991,9 +991,10 @@ int UtcDaliTouchEventActorBecomesUserInteractionDisabled(void)
   // Change actor to disable user interaction.
   actor.SetProperty(DevelActor::Property::USER_INTERACTION_ENABLED, false);
 
-  // Emit a motion signal, shouldn't receive a signal.
+  // Emit a motion signal, signalled with an interrupted
   application.ProcessEvent(GenerateSingleTouch(PointState::MOTION, Vector2(200.0f, 200.0f)));
-  DALI_TEST_EQUALS(false, data.functorCalled, TEST_LOCATION);
+  DALI_TEST_EQUALS(true, data.functorCalled, TEST_LOCATION);
+  DALI_TEST_EQUALS(PointState::INTERRUPTED, data.receivedTouch.points[0].state, TEST_LOCATION);
   data.Reset();
   END_TEST;
 }
index a555a61..0222fcf 100644 (file)
@@ -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() && actorImpl.IsUserInteractionEnabled() && (state != PointState::MOTION || actorImpl.IsDispatchTouchMotion());
+  return actorImpl.GetInterceptTouchRequired() && (actorImpl.IsHittable() || state == PointState::INTERRUPTED ) && (state != PointState::MOTION || actorImpl.IsDispatchTouchMotion());
 }
 
 bool ShouldEmitTouchEvent(const Actor& actorImpl, const Dali::TouchEvent& event)
 {
   PointState::Type state = event.GetState(0);
-  return actorImpl.GetTouchRequired() && actorImpl.IsUserInteractionEnabled() && (state != PointState::MOTION || actorImpl.IsDispatchTouchMotion());
+  return actorImpl.GetTouchRequired() && (actorImpl.IsHittable() || state == PointState::INTERRUPTED ) && (state != PointState::MOTION || actorImpl.IsDispatchTouchMotion());
 }
 
 // child -> parent