summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/ui/touch.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/ui/touch.c b/src/ui/touch.c
index 296e0e08..74a22baf 100644
--- a/src/ui/touch.c
+++ b/src/ui/touch.c
@@ -318,6 +318,8 @@ static void update_TouchState_(void *ptr) {
318 if (pixels.x || pixels.y) { 318 if (pixels.x || pixels.y) {
319 subv_F3(&mom->accum, initI2_F3(pixels)); 319 subv_F3(&mom->accum, initI2_F3(pixels));
320 dispatchMotion_Touch_(mom->pos, 0); 320 dispatchMotion_Touch_(mom->pos, 0);
321 iAssert(mom->affinity);
322 setCurrent_Root(mom->affinity->root);
321 dispatchEvent_Widget(mom->affinity, (SDL_Event *) &(SDL_MouseWheelEvent){ 323 dispatchEvent_Widget(mom->affinity, (SDL_Event *) &(SDL_MouseWheelEvent){
322 .type = SDL_MOUSEWHEEL, 324 .type = SDL_MOUSEWHEEL,
323 .timestamp = nowTime, 325 .timestamp = nowTime,
@@ -586,8 +588,8 @@ iBool processEvent_Touch(const SDL_Event *ev) {
586// pixels.y, y_F3(amount), y_F3(touch->accum)); 588// pixels.y, y_F3(amount), y_F3(touch->accum));
587 if (pixels.x || pixels.y) { 589 if (pixels.x || pixels.y) {
588 setFocus_Widget(NULL); 590 setFocus_Widget(NULL);
589 setCurrent_Root(touch->affinity->root);
590 dispatchMotion_Touch_(touch->pos[0], 0); 591 dispatchMotion_Touch_(touch->pos[0], 0);
592 setCurrent_Root(touch->affinity->root);
591 dispatchEvent_Widget(touch->affinity, (SDL_Event *) &(SDL_MouseWheelEvent){ 593 dispatchEvent_Widget(touch->affinity, (SDL_Event *) &(SDL_MouseWheelEvent){
592 .type = SDL_MOUSEWHEEL, 594 .type = SDL_MOUSEWHEEL,
593 .timestamp = SDL_GetTicks(), 595 .timestamp = SDL_GetTicks(),