Summary Files Commits Branches @commit @diff @stats
diff options
context:
space:
mode:
Commit1f94afe441c6b4ba0700923ed9a1475f091e2364 (patch)
Author
 Haelwenn (lanodan) Monnier <contact@hacktivis.me>
2019-06-13 02:51:37 +0200
Committer
 Haelwenn (lanodan) Monnier <contact@hacktivis.me>
2019-06-21 00:22:43 +0200
Files421d98bf1ab543aaacb736bc5f8903958074701e
goodwolf-1f94afe441c6b4ba0700923ed9a1475f091e2364.tar
goodwolf-1f94afe441c6b4ba0700923ed9a1475f091e2364.tar.gz
goodwolf-1f94afe441c6b4ba0700923ed9a1475f091e2364.zip
Parent404358779b24f0c4b54cdd63a9aa9c8d4d7f01c2 (diff)
only display mouse hover uri when it is a link
1 files changed, 9 insertions, 3 deletions
-rw-r--r--badwolf.c12
diff --git a/badwolf.c b/badwolf.c
index 67979b7..cecfb96 100644
--- a/badwolf.c
+++ b/badwolf.c
@@ -406,11 +406,17 @@ WebViewCb_mouse_target_changed(WebKitWebView *webView,
(void)webView;
(void)modifiers;
struct Client *browser = (struct Client *)user_data;
- const gchar *link_uri = webkit_hit_test_result_get_link_uri(hit);
- gtk_label_set_text(GTK_LABEL(browser->statuslabel), webkit_uri_for_display(link_uri));
+ if(webkit_hit_test_result_context_is_link(hit))
+ {
+ const gchar *link_uri = webkit_hit_test_result_get_link_uri(hit);
- return TRUE;
+ gtk_label_set_text(GTK_LABEL(browser->statuslabel), webkit_uri_for_display(link_uri));
+ }
+ else
+ gtk_label_set_text(GTK_LABEL(browser->statuslabel), NULL);
+
+ return FALSE;
}
static gboolean