diff options
author | gerito1 <gero.bare@gmail.com> | 2019-02-26 13:58:56 -0300 |
---|---|---|
committer | Christian Dywan <christian@twotoasts.de> | 2019-02-26 17:58:56 +0100 |
commit | c03b46ffe88a5ce20a869c53978351523da0841d (patch) | |
tree | 387022acf5247fedabd30d047f85f6f8db34eb67 | |
parent | 0ba2ee846514f458b71824b0bf78a0c9da33eb28 (diff) | |
download | midori-git-c03b46ffe88a5ce20a869c53978351523da0841d.tar.gz |
Prevent focus Urlbar when activating tab. (#274)
Prevent focus Urlbar when activating tab, checks the url is not blank.
-rw-r--r-- | core/browser.vala | 4 | ||||
-rw-r--r-- | core/urlbar.vala | 2 |
2 files changed, 4 insertions, 2 deletions
diff --git a/core/browser.vala b/core/browser.vala index 2d59ec4c..c226d6be 100644 --- a/core/browser.vala +++ b/core/browser.vala @@ -457,7 +457,9 @@ namespace Midori { void goto_activated () { if (!tab.pinned) { navigationbar.show (); - navigationbar.urlbar.grab_focus (); + if (navigationbar.urlbar.blank) { + navigationbar.urlbar.grab_focus (); + } } } diff --git a/core/urlbar.vala b/core/urlbar.vala index ea80ab37..4e279e24 100644 --- a/core/urlbar.vala +++ b/core/urlbar.vala @@ -31,7 +31,7 @@ namespace Midori { _secure = value; update_icon (); } } - bool blank { get { return uri == "about:blank" || uri == "internal:speed-dial"; } } + internal bool blank { get { return uri == "about:blank" || uri == "internal:speed-dial"; } } [GtkChild] Gtk.Popover? suggestions; |