From 12d1381cdabc0edce9acadb0331ffeb902707913 Mon Sep 17 00:00:00 2001 From: "joogab.yun" Date: Thu, 10 Feb 2022 14:00:00 +0900 Subject: [PATCH] [Tizen] If MaximumTapsRequired is 1, it is not waiting for a multi-tap, so a Tap gesture send a single tap. Even if set to tapGestureDetector.SetMaximumTapsRequired(1); When user tap multiple times quickly, the tap gesture event now fires only once every maximum Allowed Time (500ms). If MaximumTapsRequired is 1, user want to receive tap gesture events immediately because we are not waiting for a multi-tap. Change-Id: I9651facb9650982e2e0dc414974677c531481bf8 --- dali/internal/event/events/tap-gesture/tap-gesture-recognizer.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/dali/internal/event/events/tap-gesture/tap-gesture-recognizer.cpp b/dali/internal/event/events/tap-gesture/tap-gesture-recognizer.cpp index 975c847..896b6cd 100644 --- a/dali/internal/event/events/tap-gesture/tap-gesture-recognizer.cpp +++ b/dali/internal/event/events/tap-gesture/tap-gesture-recognizer.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2021 Samsung Electronics Co., Ltd. + * Copyright (c) 2022 Samsung Electronics Co., Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -137,7 +137,8 @@ void TapGestureRecognizer::SendEvent(const Integration::TouchEvent& event) // This is a possible multiple tap, so has it been quick enough? uint32_t timeDelta = event.time - mLastTapTime; uint32_t deltaBetweenTouchDownTouchUp = event.time - mTouchTime; - if(timeDelta > MAXIMUM_TIME_ALLOWED) // If exceeded time between taps then just a single tap + if(timeDelta > MAXIMUM_TIME_ALLOWED || // If exceeded time between taps then just a single tap + mMaximumTapsRequired == 1u) // If MaximumTapsRequired is 1, it is not waiting for a multi-tap, so a Tap gesture send a single tap. { mLastTapTime = event.time; EmitSingleTap(event.time, point); -- 2.7.4