From 38952630173550cb1ec5e3ae33b928bdffca6d29 Mon Sep 17 00:00:00 2001 From: "Eunki, Hong" Date: Wed, 25 Oct 2023 16:35:42 +0900 Subject: [PATCH] Revert "[Tizen] When a touch-up occurs, a hover-down event is generated." This reverts commit 221eeb04b57a0612baa1fdd4f5ba41f69a6b0aed. --- .../src/dali/utc-Dali-TouchEventCombiner.cpp | 55 ---------------------- .../events/touch-event-combiner.cpp | 10 ---- 2 files changed, 65 deletions(-) diff --git a/automated-tests/src/dali/utc-Dali-TouchEventCombiner.cpp b/automated-tests/src/dali/utc-Dali-TouchEventCombiner.cpp index f9664c4..1b6eb75 100644 --- a/automated-tests/src/dali/utc-Dali-TouchEventCombiner.cpp +++ b/automated-tests/src/dali/utc-Dali-TouchEventCombiner.cpp @@ -911,58 +911,3 @@ int UtcDaliTouchEventCombinerInvalidState(void) } END_TEST; } - -int UtcDaliTouchEventCombinerHoverDownAfterTouchUp(void) -{ - TouchEventCombiner combiner; - unsigned long time(0u); - - // Motion event - { - Integration::TouchEvent touchEvent; - Integration::HoverEvent hoverEvent; - Integration::Point point = GeneratePoint(1, PointState::MOTION, 100.0f, 100.0f); - point.SetDeviceClass(Device::Class::Type::MOUSE); - - DALI_TEST_EQUALS(Integration::TouchEventCombiner::DISPATCH_HOVER, combiner.GetNextTouchEvent(point, time, touchEvent, hoverEvent), TEST_LOCATION); - DALI_TEST_EQUALS(hoverEvent.GetPointCount(), 1u, TEST_LOCATION); - DALI_TEST_EQUALS(hoverEvent.points[0].GetDeviceId(), point.GetDeviceId(), TEST_LOCATION); - DALI_TEST_EQUALS(hoverEvent.points[0].GetState(), PointState::STARTED, TEST_LOCATION); - DALI_TEST_EQUALS(hoverEvent.points[0].GetScreenPosition(), point.GetScreenPosition(), TEST_LOCATION); - } - - - time++; - - // down event - { - Integration::TouchEvent touchEvent; - Integration::HoverEvent hoverEvent; - Integration::Point point = GeneratePoint(1, PointState::DOWN, 100.0f, 100.0f); - point.SetDeviceClass(Device::Class::Type::MOUSE); - - DALI_TEST_EQUALS(Integration::TouchEventCombiner::DISPATCH_BOTH, combiner.GetNextTouchEvent(point, time, touchEvent, hoverEvent), TEST_LOCATION); - DALI_TEST_EQUALS(hoverEvent.GetPointCount(), 1u, TEST_LOCATION); - DALI_TEST_EQUALS(hoverEvent.points[0].GetDeviceId(), point.GetDeviceId(), TEST_LOCATION); - DALI_TEST_EQUALS(hoverEvent.points[0].GetState(), PointState::FINISHED, TEST_LOCATION); - DALI_TEST_EQUALS(hoverEvent.points[0].GetScreenPosition(), point.GetScreenPosition(), TEST_LOCATION); - } - - time++; - - // up event - { - Integration::TouchEvent touchEvent; - Integration::HoverEvent hoverEvent; - Integration::Point point = GeneratePoint(1, PointState::UP, 103.0f, 103.0f); - point.SetDeviceClass(Device::Class::Type::MOUSE); - - DALI_TEST_EQUALS(Integration::TouchEventCombiner::DISPATCH_BOTH, combiner.GetNextTouchEvent(point, time, touchEvent, hoverEvent), TEST_LOCATION); - DALI_TEST_EQUALS(hoverEvent.GetPointCount(), 1u, TEST_LOCATION); - DALI_TEST_EQUALS(hoverEvent.points[0].GetDeviceId(), point.GetDeviceId(), TEST_LOCATION); - DALI_TEST_EQUALS(hoverEvent.points[0].GetState(), PointState::DOWN, TEST_LOCATION); - DALI_TEST_EQUALS(hoverEvent.points[0].GetScreenPosition(), point.GetScreenPosition(), TEST_LOCATION); - } - - END_TEST; -} diff --git a/dali/integration-api/events/touch-event-combiner.cpp b/dali/integration-api/events/touch-event-combiner.cpp index 7423590..9aa64a8 100644 --- a/dali/integration-api/events/touch-event-combiner.cpp +++ b/dali/integration-api/events/touch-event-combiner.cpp @@ -188,16 +188,6 @@ TouchEventCombiner::EventDispatchType TouchEventCombiner::GetNextTouchEvent(cons iter = mHoveredPoints.erase(iter); } } - - if(deviceType == Device::Class::Type::MOUSE) - { - hoverEvent.time = time; - Point hoverPoint(point); - hoverPoint.SetState(PointState::STARTED); // The first hover event received - mHoveredPoints.push_back(PointInfo(hoverPoint, time)); - hoverEvent.AddPoint(hoverPoint); - dispatchEvent = TouchEventCombiner::DISPATCH_BOTH; - } } break; } -- 2.7.4