summaryrefslogtreecommitdiff
path: root/src/ui/touch.c
diff options
context:
space:
mode:
authorJaakko Keränen <jaakko.keranen@iki.fi>2021-03-13 19:50:37 +0200
committerJaakko Keränen <jaakko.keranen@iki.fi>2021-03-13 19:50:37 +0200
commit379f8cea2044854be02622a561dd3c9cd9fb06c2 (patch)
tree3e8d36379a12b96b1fdff338fe9e98954e077b4a /src/ui/touch.c
parent1684318e5605ca0850dca0230bff1ba10bceb8bd (diff)
Touch: Fixed long press on input fields
Diffstat (limited to 'src/ui/touch.c')
-rw-r--r--src/ui/touch.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/ui/touch.c b/src/ui/touch.c
index 968e3011..8866fb43 100644
--- a/src/ui/touch.c
+++ b/src/ui/touch.c
@@ -184,8 +184,7 @@ static void update_TouchState_(void *ptr) {
184 /* Looks like a possible tap. */ 184 /* Looks like a possible tap. */
185 dispatchMotion_Touch_(touch->pos[0], 0); 185 dispatchMotion_Touch_(touch->pos[0], 0);
186 } 186 }
187 if (~flags_Widget(touch->affinity) & touchDrag_WidgetFlag && 187 if (!touch->isTapAndHold && nowTime - touch->startTime >= longPressSpanMs_ &&
188 !touch->isTapAndHold && nowTime - touch->startTime >= longPressSpanMs_ &&
189 touch->affinity) { 188 touch->affinity) {
190 dispatchClick_Touch_(touch, SDL_BUTTON_RIGHT); 189 dispatchClick_Touch_(touch, SDL_BUTTON_RIGHT);
191 touch->isTapAndHold = iTrue; 190 touch->isTapAndHold = iTrue;