summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorPatrick McDermott <pj@pehjota.net>2017-09-17 13:59:54 (EDT)
committer Patrick McDermott <pj@pehjota.net>2017-09-17 14:00:41 (EDT)
commit27189c42c6f7d8977eede94f4b418e4fef736af4 (patch)
treedaa197c69a651bce5c1885830d0549a2ce99b807 /src
parent9da0db1d83cdfc32c140d9416c0ee10529739d0f (diff)
downloadmarquee-27189c42c6f7d8977eede94f4b418e4fef736af4.zip
marquee-27189c42c6f7d8977eede94f4b418e4fef736af4.tar.gz
marquee-27189c42c6f7d8977eede94f4b418e4fef736af4.tar.bz2
src/tab-chrome.c: Handle change of target from link to link
Diffstat (limited to 'src')
-rw-r--r--src/tab-chrome.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/tab-chrome.c b/src/tab-chrome.c
index 93878fd..7b3d1e5 100644
--- a/src/tab-chrome.c
+++ b/src/tab-chrome.c
@@ -223,6 +223,15 @@ mouse_target_changed_cb(WebKitWebView __attribute__((unused)) *web_view,
hit_test_result));
gtk_entry_set_attributes(GTK_ENTRY(chrome->uri_entry),
chrome->hovered_link_style);
+ } else if (gtk_entry_get_attributes(
+ GTK_ENTRY(chrome->uri_entry)) ==
+ chrome->hovered_link_style) {
+ /* The URI bar's text differs from the Web view's URI
+ * because the mouse was already targeting a different
+ * link. */
+ gtk_entry_set_text(GTK_ENTRY(chrome->uri_entry),
+ webkit_hit_test_result_get_link_uri(
+ hit_test_result));
}
} else {
if (gtk_entry_get_attributes(GTK_ENTRY(chrome->uri_entry)) ==