summaryrefslogtreecommitdiff
path: root/src/ui/touch.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/ui/touch.c')
-rw-r--r--src/ui/touch.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/ui/touch.c b/src/ui/touch.c
index 5fc8f245..61882739 100644
--- a/src/ui/touch.c
+++ b/src/ui/touch.c
@@ -293,6 +293,7 @@ static void update_TouchState_(void *ptr) {
293 } 293 }
294 if (elapsed > 50 && !touch->isTapBegun) { 294 if (elapsed > 50 && !touch->isTapBegun) {
295 /* Looks like a possible tap. */ 295 /* Looks like a possible tap. */
296 touchState_()->currentTouchPos = initF3_I2(touch->pos[0]);
296 dispatchNotification_Touch_(touch, widgetTapBegins_UserEventCode); 297 dispatchNotification_Touch_(touch, widgetTapBegins_UserEventCode);
297 dispatchMotion_Touch_(touch->pos[0], 0); 298 dispatchMotion_Touch_(touch->pos[0], 0);
298 refresh_Widget(touch->affinity); 299 refresh_Widget(touch->affinity);
@@ -471,13 +472,13 @@ iBool processEvent_Touch(const SDL_Event *ev) {
471 } 472 }
472 iTouchState *d = touchState_(); 473 iTouchState *d = touchState_();
473 iWindow *window = get_Window(); 474 iWindow *window = get_Window();
474 if (!isFinished_Anim(&window->rootOffset)) { 475// if (!isFinished_Anim(&window->rootOffset)) {
475 return iFalse; 476// return iFalse;
476 } 477// }
477 const iInt2 rootSize = size_Window(window); 478 const iInt2 rootSize = size_Window(window);
478 const SDL_TouchFingerEvent *fing = &ev->tfinger; 479 const SDL_TouchFingerEvent *fing = &ev->tfinger;
479 const iFloat3 pos = add_F3(init_F3(fing->x * rootSize.x, fing->y * rootSize.y, 0), /* pixels */ 480 const iFloat3 pos = add_F3(init_F3(fing->x * rootSize.x, fing->y * rootSize.y, 0), /* pixels */
480 init_F3(0, -value_Anim(&window->rootOffset), 0)); 481 init_F3(0, 0 /*-value_Anim(&window->rootOffset)*/, 0));
481 const uint32_t nowTime = SDL_GetTicks(); 482 const uint32_t nowTime = SDL_GetTicks();
482 if (ev->type == SDL_FINGERDOWN) { 483 if (ev->type == SDL_FINGERDOWN) {
483 /* Register the new touch. */ 484 /* Register the new touch. */