summaryrefslogtreecommitdiff
path: root/frontends/gtk/toolbar.c
diff options
context:
space:
mode:
authorDaniel Silverstone <dsilvers@digital-scurf.org>2020-02-22 11:51:10 +0000
committerDaniel Silverstone <dsilvers@digital-scurf.org>2020-02-22 11:51:10 +0000
commit5c377cd285536f4bec2a6cfb6352a45cfe6cb39e (patch)
treee87a9e2f7e3d8207714717fac427d1e97158625c /frontends/gtk/toolbar.c
parentf3bdee255d3c4252640b2337224e2f0b95944d7f (diff)
downloadnetsurf-5c377cd285536f4bec2a6cfb6352a45cfe6cb39e.tar.gz
netsurf-5c377cd285536f4bec2a6cfb6352a45cfe6cb39e.tar.bz2
GTK: Use new BW_CREATE_FOREGROUND flags
This gets rid of temp_open_background which was, frankly, a bit of an eyesore. In addition it makes the open-in-new-tab context menu action behave like Firefox's with respect to the user's preference regarding whether or not to immediately focus new tabs. Signed-off-by: Daniel Silverstone <dsilvers@digital-scurf.org>
Diffstat (limited to 'frontends/gtk/toolbar.c')
-rw-r--r--frontends/gtk/toolbar.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/frontends/gtk/toolbar.c b/frontends/gtk/toolbar.c
index f191bc174..1a6bc124e 100644
--- a/frontends/gtk/toolbar.c
+++ b/frontends/gtk/toolbar.c
@@ -926,7 +926,7 @@ nsgtk_browser_window_create(struct browser_window *bw, bool intab)
{
nserror res = NSERROR_OK;
nsurl *url = NULL;
- int flags = BW_CREATE_HISTORY;
+ int flags = BW_CREATE_HISTORY | BW_CREATE_FOREGROUND;
if (intab) {
flags |= BW_CREATE_TAB;
@@ -1995,16 +1995,14 @@ static gboolean websearch_entry_activate_cb(GtkWidget *widget, gpointer data)
SEARCH_WEB_OMNI_SEARCHONLY,
&url);
if (res == NSERROR_OK) {
- temp_open_background = 0;
bw = tb->get_bw(tb->get_ctx);
res = browser_window_create(
- BW_CREATE_HISTORY | BW_CREATE_TAB,
+ BW_CREATE_HISTORY | BW_CREATE_TAB | BW_CREATE_FOREGROUND,
url,
NULL,
bw,
NULL);
- temp_open_background = -1;
nsurl_unref(url);
}
if (res != NSERROR_OK) {