Stop hinting when element clicked by mouse.
authorDaniel Carl <danielcarl@gmx.de>
Sat, 20 May 2017 23:58:54 +0000 (01:58 +0200)
committerDaniel Carl <danielcarl@gmx.de>
Sun, 21 May 2017 00:16:46 +0000 (02:16 +0200)
In case a links was clicked by mouse during active hinting, the new page
was loaded and kept still in hinting mode but there where no hints shown
on the new page.

src/main.c

index e03aaaa..0de0da4 100644 (file)
@@ -1206,6 +1206,13 @@ static void on_webview_load_changed(WebKitWebView *webview,
             c->state.progress = 0;
             vb_statusbar_update(c);
             set_title(c, webkit_web_view_get_uri(webview));
+            /* Make sure hinting is cleared before the new page is loaded.
+             * Without that vimb would still be in hinting mode after hinting
+             * was started and some links was clicked my mouse. Even if there
+             * could not hints be shown. */
+            if (c->mode->flags & FLAG_HINTING) {
+                vb_enter(c, 'n');
+            }
             break;
 
         case WEBKIT_LOAD_REDIRECTED: