diff options
author | Jaakko Keränen <jaakko.keranen@iki.fi> | 2021-03-13 19:50:37 +0200 |
---|---|---|
committer | Jaakko Keränen <jaakko.keranen@iki.fi> | 2021-03-13 19:50:37 +0200 |
commit | 379f8cea2044854be02622a561dd3c9cd9fb06c2 (patch) | |
tree | 3e8d36379a12b96b1fdff338fe9e98954e077b4a /src/ui/touch.c | |
parent | 1684318e5605ca0850dca0230bff1ba10bceb8bd (diff) |
Touch: Fixed long press on input fields
Diffstat (limited to 'src/ui/touch.c')
-rw-r--r-- | src/ui/touch.c | 3 |
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; |