diff options
author | Jaakko Keränen <jaakko.keranen@iki.fi> | 2021-05-17 22:00:07 +0300 |
---|---|---|
committer | Jaakko Keränen <jaakko.keranen@iki.fi> | 2021-05-17 22:00:07 +0300 |
commit | 65b05dd2633a962fad1e858fc8c0379d55960753 (patch) | |
tree | 9e6f8306a73becb29a6bfe57464ea81d7e58924b /src/ui | |
parent | c94469c3b5e46fa15939de271e6a4e1cc812dea3 (diff) |
Touch: Fixes for split view event dispatch
Diffstat (limited to 'src/ui')
-rw-r--r-- | src/ui/touch.c | 4 |
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(), |