summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/ui/inputwidget.c2
-rw-r--r--src/ui/touch.c8
2 files changed, 6 insertions, 4 deletions
diff --git a/src/ui/inputwidget.c b/src/ui/inputwidget.c
index b214d730..d078593a 100644
--- a/src/ui/inputwidget.c
+++ b/src/ui/inputwidget.c
@@ -541,6 +541,8 @@ static void updateVisible_InputWidget_(iInputWidget *d) {
541 d->visWrapLines.start = 0; 541 d->visWrapLines.start = 0;
542 d->visWrapLines.end = 1; 542 d->visWrapLines.end = 1;
543 } 543 }
544// printf("[InputWidget %p] total:%d viswrp:%d cur:%d vis:%d..%d\n",
545// d, totalWraps, visWraps, d->cursor.y, d->visWrapLines.start, d->visWrapLines.end);
544} 546}
545 547
546static void showCursor_InputWidget_(iInputWidget *d) { 548static void showCursor_InputWidget_(iInputWidget *d) {
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 {
59struct Impl_Touch { 59struct 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)) {