diff options
Diffstat (limited to 'src/ui/touch.c')
-rw-r--r-- | src/ui/touch.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/ui/touch.c b/src/ui/touch.c index 61882739..f3f10fe1 100644 --- a/src/ui/touch.c +++ b/src/ui/touch.c | |||
@@ -59,7 +59,6 @@ enum iTouchAxis { | |||
59 | struct Impl_Touch { | 59 | struct Impl_Touch { |
60 | SDL_FingerID id; | 60 | SDL_FingerID id; |
61 | iWidget *affinity; /* widget on which the touch started */ | 61 | iWidget *affinity; /* widget on which the touch started */ |
62 | // iWidget *edgeDragging; | ||
63 | iBool hasMoved; | 62 | iBool hasMoved; |
64 | iBool isTapBegun; | 63 | iBool isTapBegun; |
65 | iBool isLeftDown; | 64 | iBool isLeftDown; |
@@ -623,14 +622,15 @@ iBool processEvent_Touch(const SDL_Event *ev) { | |||
623 | // touch->edge); | 622 | // touch->edge); |
624 | if (pixels.x || pixels.y) { | 623 | if (pixels.x || pixels.y) { |
625 | //setFocus_Widget(NULL); | 624 | //setFocus_Widget(NULL); |
626 | dispatchMotion_Touch_(touch->pos[0], 0); | 625 | dispatchMotion_Touch_(touch->startPos /*pos[0]*/, 0); |
627 | setCurrent_Root(touch->affinity->root); | 626 | setCurrent_Root(touch->affinity->root); |
628 | dispatchEvent_Widget(touch->affinity, (SDL_Event *) &(SDL_MouseWheelEvent){ | 627 | dispatchEvent_Widget(touch->affinity, (SDL_Event *) &(SDL_MouseWheelEvent){ |
629 | .type = SDL_MOUSEWHEEL, | 628 | .type = SDL_MOUSEWHEEL, |
629 | .which = SDL_TOUCH_MOUSEID, | ||
630 | .timestamp = SDL_GetTicks(), | 630 | .timestamp = SDL_GetTicks(), |
631 | .x = pixels.x, | 631 | .x = pixels.x, |
632 | .y = pixels.y, | 632 | .y = pixels.y, |
633 | .direction = perPixel_MouseWheelFlag | 633 | .direction = perPixel_MouseWheelFlag, |
634 | }); | 634 | }); |
635 | /* TODO: Keep increasing movement if the direction is the same. */ | 635 | /* TODO: Keep increasing movement if the direction is the same. */ |
636 | clearWidgetMomentum_TouchState_(d, touch->affinity); | 636 | clearWidgetMomentum_TouchState_(d, touch->affinity); |
@@ -723,7 +723,7 @@ iBool processEvent_Touch(const SDL_Event *ev) { | |||
723 | iMomentum mom = { | 723 | iMomentum mom = { |
724 | .affinity = touch->affinity, | 724 | .affinity = touch->affinity, |
725 | .releaseTime = nowTime, | 725 | .releaseTime = nowTime, |
726 | .pos = touch->pos[0], | 726 | .pos = touch->startPos, // pos[0], |
727 | .velocity = velocity | 727 | .velocity = velocity |
728 | }; | 728 | }; |
729 | if (isEmpty_Array(d->moms)) { | 729 | if (isEmpty_Array(d->moms)) { |