diff options
Diffstat (limited to 'src/ui/touch.c')
-rw-r--r-- | src/ui/touch.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/ui/touch.c b/src/ui/touch.c index f0456acb..5fc8f245 100644 --- a/src/ui/touch.c +++ b/src/ui/touch.c | |||
@@ -254,6 +254,8 @@ static iFloat3 gestureVector_Touch_(const iTouch *d) { | |||
254 | } | 254 | } |
255 | 255 | ||
256 | static void update_TouchState_(void *ptr) { | 256 | static void update_TouchState_(void *ptr) { |
257 | iWindow *win = get_Window(); | ||
258 | const iWidget *oldHover = win->hover; | ||
257 | iTouchState *d = ptr; | 259 | iTouchState *d = ptr; |
258 | /* Check for long presses to simulate right clicks. */ | 260 | /* Check for long presses to simulate right clicks. */ |
259 | const uint32_t nowTime = SDL_GetTicks(); | 261 | const uint32_t nowTime = SDL_GetTicks(); |
@@ -293,6 +295,7 @@ static void update_TouchState_(void *ptr) { | |||
293 | /* Looks like a possible tap. */ | 295 | /* Looks like a possible tap. */ |
294 | dispatchNotification_Touch_(touch, widgetTapBegins_UserEventCode); | 296 | dispatchNotification_Touch_(touch, widgetTapBegins_UserEventCode); |
295 | dispatchMotion_Touch_(touch->pos[0], 0); | 297 | dispatchMotion_Touch_(touch->pos[0], 0); |
298 | refresh_Widget(touch->affinity); | ||
296 | touch->isTapBegun = iTrue; | 299 | touch->isTapBegun = iTrue; |
297 | } | 300 | } |
298 | if (!touch->isTapAndHold && nowTime - touch->startTime >= longPressSpanMs_ && | 301 | if (!touch->isTapAndHold && nowTime - touch->startTime >= longPressSpanMs_ && |
@@ -363,6 +366,10 @@ static void update_TouchState_(void *ptr) { | |||
363 | if (!isEmpty_Array(d->touches) || !isEmpty_Array(d->moms)) { | 366 | if (!isEmpty_Array(d->touches) || !isEmpty_Array(d->moms)) { |
364 | addTickerRoot_App(update_TouchState_, NULL, ptr); | 367 | addTickerRoot_App(update_TouchState_, NULL, ptr); |
365 | } | 368 | } |
369 | if (oldHover != win->hover) { | ||
370 | refresh_Widget(oldHover); | ||
371 | refresh_Widget(win->hover); | ||
372 | } | ||
366 | } | 373 | } |
367 | 374 | ||
368 | #if 0 | 375 | #if 0 |