diff options
-rw-r--r-- | src/ui/documentwidget.c | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/src/ui/documentwidget.c b/src/ui/documentwidget.c index 15134e5f..84e9ebfe 100644 --- a/src/ui/documentwidget.c +++ b/src/ui/documentwidget.c | |||
@@ -2585,7 +2585,9 @@ static iBool processEvent_DocumentWidget_(iDocumentWidget *d, const SDL_Event *e | |||
2585 | return iTrue; | 2585 | return iTrue; |
2586 | } | 2586 | } |
2587 | else if (ev->type == SDL_MOUSEMOTION) { | 2587 | else if (ev->type == SDL_MOUSEMOTION) { |
2588 | iChangeFlags(d->flags, noHoverWhileScrolling_DocumentWidgetFlag, iFalse); | 2588 | if (deviceType_App() == desktop_AppDeviceType) { |
2589 | iChangeFlags(d->flags, noHoverWhileScrolling_DocumentWidgetFlag, iFalse); | ||
2590 | } | ||
2589 | const iInt2 mpos = init_I2(ev->motion.x, ev->motion.y); | 2591 | const iInt2 mpos = init_I2(ev->motion.x, ev->motion.y); |
2590 | if (isVisible_Widget(d->menu)) { | 2592 | if (isVisible_Widget(d->menu)) { |
2591 | setCursor_Window(get_Window(), SDL_SYSTEM_CURSOR_ARROW); | 2593 | setCursor_Window(get_Window(), SDL_SYSTEM_CURSOR_ARROW); |
@@ -2601,6 +2603,7 @@ static iBool processEvent_DocumentWidget_(iDocumentWidget *d, const SDL_Event *e | |||
2601 | } | 2603 | } |
2602 | } | 2604 | } |
2603 | if (ev->type == SDL_MOUSEBUTTONDOWN) { | 2605 | if (ev->type == SDL_MOUSEBUTTONDOWN) { |
2606 | iChangeFlags(d->flags, noHoverWhileScrolling_DocumentWidgetFlag, iFalse); | ||
2604 | if (ev->button.button == SDL_BUTTON_X1) { | 2607 | if (ev->button.button == SDL_BUTTON_X1) { |
2605 | postCommand_App("navigate.back"); | 2608 | postCommand_App("navigate.back"); |
2606 | return iTrue; | 2609 | return iTrue; |
@@ -3136,12 +3139,6 @@ static void drawRun_DrawContext_(void *context, const iGmRun *run) { | |||
3136 | iBool isHover = | 3139 | iBool isHover = |
3137 | (run->linkId && d->widget->hoverLink && run->linkId == d->widget->hoverLink->linkId && | 3140 | (run->linkId && d->widget->hoverLink && run->linkId == d->widget->hoverLink->linkId && |
3138 | ~run->flags & decoration_GmRunFlag); | 3141 | ~run->flags & decoration_GmRunFlag); |
3139 | /* On mobile, links are not hovered unless a finger is touching. */ | ||
3140 | if (deviceType_App() != desktop_AppDeviceType) { | ||
3141 | if (numFingers_Touch() == 0) { | ||
3142 | isHover = iFalse; | ||
3143 | } | ||
3144 | } | ||
3145 | const iInt2 visPos = addX_I2(add_I2(run->visBounds.pos, origin), | 3142 | const iInt2 visPos = addX_I2(add_I2(run->visBounds.pos, origin), |
3146 | /* Preformatted runs can be scrolled. */ | 3143 | /* Preformatted runs can be scrolled. */ |
3147 | runOffset_DocumentWidget_(d->widget, run)); | 3144 | runOffset_DocumentWidget_(d->widget, run)); |