From c9e5fa9bc12252ba9dedf35a8b219423dea7ba44 Mon Sep 17 00:00:00 2001 From: Daniel Silverstone Date: Sat, 22 Feb 2020 15:47:17 +0000 Subject: GTK: Ensure that we don't frob the URL bar from the scaffold To correctly refocus the location box on tab switching we need to not update the url of the tab when the scaffold updates its global context. Signed-off-by: Daniel Silverstone --- frontends/gtk/scaffolding.c | 5 +---- frontends/gtk/toolbar.c | 3 +++ 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/frontends/gtk/scaffolding.c b/frontends/gtk/scaffolding.c index 0b3fe6783..030c6d488 100644 --- a/frontends/gtk/scaffolding.c +++ b/frontends/gtk/scaffolding.c @@ -262,9 +262,6 @@ static void scaffolding_update_context(struct nsgtk_scaffolding *g) nsgtk_scaffolding_set_sensitivity(g); - /* update the url bar, particularly necessary when tabbing */ - browser_window_refresh_url_bar(bw); - nsgtk_local_history_hide(); } @@ -1353,7 +1350,7 @@ void nsgtk_scaffolding_set_top_level(struct gui_window *gw) sc->top_level = gw; - /* Synchronise the history (will also update the URL bar) */ + /* Synchronise the history */ scaffolding_update_context(sc); /* Ensure the window's title bar is updated */ diff --git a/frontends/gtk/toolbar.c b/frontends/gtk/toolbar.c index f2b1d05c8..16e5f1f6d 100644 --- a/frontends/gtk/toolbar.c +++ b/frontends/gtk/toolbar.c @@ -3592,6 +3592,9 @@ nserror nsgtk_toolbar_throbber(struct nsgtk_toolbar *tb, bool active) browser_window_history_forward_available(bw)); nsgtk_local_history_hide(); + /* update the url bar, for the final time */ + browser_window_refresh_url_bar(bw); + return res; } -- cgit v1.2.3