diff options
author | Patrick McDermott <pj@pehjota.net> | 2017-09-28 11:00:35 (EDT) |
---|---|---|
committer | Patrick McDermott <pj@pehjota.net> | 2017-09-28 11:00:35 (EDT) |
commit | 0c60920ff375396856fc4091240669cb3cbbc004 (patch) | |
tree | 50e0b358e6c2d3d0f553df1668786f4606ef34ba /src | |
parent | 9d622b6b42d28464eef9066b9a39b7d85b2e9c56 (diff) | |
download | marquee-0c60920ff375396856fc4091240669cb3cbbc004.zip marquee-0c60920ff375396856fc4091240669cb3cbbc004.tar.gz marquee-0c60920ff375396856fc4091240669cb3cbbc004.tar.bz2 |
MqTabChrome: Don't change URI bar text if focused
Diffstat (limited to 'src')
-rw-r--r-- | src/tab-chrome.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/tab-chrome.c b/src/tab-chrome.c index e790150..c249773 100644 --- a/src/tab-chrome.c +++ b/src/tab-chrome.c @@ -515,7 +515,9 @@ mouse_target_changed_cb(WebKitWebView __attribute__((unused)) *web_view, MqTabChrome *chrome) { if (webkit_hit_test_result_context_is_link(hit_test_result)) { - if (chrome->hovered_link_uri && g_strcmp0(gtk_entry_get_text( + if (gtk_widget_has_focus(chrome->uri_entry)) { + } else if (chrome->hovered_link_uri && + g_strcmp0(gtk_entry_get_text( GTK_ENTRY(chrome->uri_entry)), chrome->hovered_link_uri) != 0) { /* The user has edited the hovered link URI in the URI @@ -546,7 +548,9 @@ mouse_target_changed_cb(WebKitWebView __attribute__((unused)) *web_view, } } else if (gtk_entry_get_attributes(GTK_ENTRY(chrome->uri_entry)) == chrome->hovered_link_style) { - if (g_strcmp0(gtk_entry_get_text(GTK_ENTRY(chrome->uri_entry)), + if (gtk_widget_has_focus(chrome->uri_entry)) { + } else if (g_strcmp0(gtk_entry_get_text( + GTK_ENTRY(chrome->uri_entry)), chrome->hovered_link_uri) == 0) { /* The user hasn't edited the hovered link URI in the * URI bar. */ |