From d7a828ff3dda27c7fa70a21084fa06dfa808c6b6 Mon Sep 17 00:00:00 2001 From: Emircan Uysaler Date: Thu, 2 Dec 2021 14:38:30 -0500 Subject: [PATCH] [fuchsia] Change Touch response to YES (flutter/engine#30041) --- .../shell/platform/fuchsia/flutter/pointer_delegate.cc | 2 +- .../fuchsia/flutter/pointer_delegate_unittests.cc | 9 +++------ 2 files changed, 4 insertions(+), 7 deletions(-) diff --git a/engine/src/flutter/shell/platform/fuchsia/flutter/pointer_delegate.cc b/engine/src/flutter/shell/platform/fuchsia/flutter/pointer_delegate.cc index d28fbb927e..4e383197d7 100644 --- a/engine/src/flutter/shell/platform/fuchsia/flutter/pointer_delegate.cc +++ b/engine/src/flutter/shell/platform/fuchsia/flutter/pointer_delegate.cc @@ -356,7 +356,7 @@ void PointerDelegate::WatchLoop( InsertIntoBuffer(std::move(events), &to_client); } // For this simple client, always claim we want the gesture. - response.set_response_type(fup_TouchResponseType::YES_PRIORITIZE); + response.set_response_type(fup_TouchResponseType::YES); } if (event.has_interaction_result()) { const auto& result = event.interaction_result(); diff --git a/engine/src/flutter/shell/platform/fuchsia/flutter/pointer_delegate_unittests.cc b/engine/src/flutter/shell/platform/fuchsia/flutter/pointer_delegate_unittests.cc index 5a6bc9f533..763958c37e 100644 --- a/engine/src/flutter/shell/platform/fuchsia/flutter/pointer_delegate_unittests.cc +++ b/engine/src/flutter/shell/platform/fuchsia/flutter/pointer_delegate_unittests.cc @@ -343,14 +343,11 @@ TEST_F(PointerDelegateTest, Protocol_ResponseMatchesEarlierEvents) { EXPECT_FALSE(responses.value()[0].has_response_type()); // Events 1-3 had a sample, must have a response. EXPECT_TRUE(responses.value()[1].has_response_type()); - EXPECT_EQ(responses.value()[1].response_type(), - fup_TouchResponseType::YES_PRIORITIZE); + EXPECT_EQ(responses.value()[1].response_type(), fup_TouchResponseType::YES); EXPECT_TRUE(responses.value()[2].has_response_type()); - EXPECT_EQ(responses.value()[2].response_type(), - fup_TouchResponseType::YES_PRIORITIZE); + EXPECT_EQ(responses.value()[2].response_type(), fup_TouchResponseType::YES); EXPECT_TRUE(responses.value()[3].has_response_type()); - EXPECT_EQ(responses.value()[3].response_type(), - fup_TouchResponseType::YES_PRIORITIZE); + EXPECT_EQ(responses.value()[3].response_type(), fup_TouchResponseType::YES); } TEST_F(PointerDelegateTest, Protocol_LateGrant) {