summaryrefslogtreecommitdiff
path: root/frontends/amiga
diff options
context:
space:
mode:
authorChris Young <chris@unsatisfactorysoftware.co.uk>2016-09-10 20:41:07 +0100
committerChris Young <chris@unsatisfactorysoftware.co.uk>2016-09-10 20:41:07 +0100
commit92601c26aef50f924df63161305888a96b70383c (patch)
tree22e2aef4d4e2975cd6e845ea2dfd69e61b39d0b7 /frontends/amiga
parent26c568af15eb266d188909c848406c07563286db (diff)
downloadnetsurf-92601c26aef50f924df63161305888a96b70383c.tar.gz
netsurf-92601c26aef50f924df63161305888a96b70383c.tar.bz2
If NetSurf is already running, ensure when we open a new tab that it becomes active.
This matches the behaviour in more mainstream web browsers.
Diffstat (limited to 'frontends/amiga')
-rwxr-xr-xfrontends/amiga/dist/Install4
-rw-r--r--frontends/amiga/gui.c12
2 files changed, 6 insertions, 10 deletions
diff --git a/frontends/amiga/dist/Install b/frontends/amiga/dist/Install
index 55631905e..dd4eb5149 100755
--- a/frontends/amiga/dist/Install
+++ b/frontends/amiga/dist/Install
@@ -320,7 +320,7 @@
(help @textfile-help)
(dest "Rexx:NetSurf")
(append "/*\n"
-" * Copyright 2013 Chris Young <chris@unsatisfactorysoftware.co.uk>\n"
+" * Copyright 2013, 2016 Chris Young <chris@unsatisfactorysoftware.co.uk>\n"
" *\n"
" * This file is part of NetSurf, http://www.netsurf-browser.org/\n"
" *\n"
@@ -346,7 +346,7 @@
"parse arg url\n"
"\n"
"if show('P', 'NETSURF') then do\n"
-" address NETSURF 'OPEN' url 'NEWTAB'\n"
+" address NETSURF 'OPEN' url 'NEWTAB ACTIVE'\n"
" address NETSURF 'TOFRONT'\n"
"end\n"
"else do\n"
diff --git a/frontends/amiga/gui.c b/frontends/amiga/gui.c
index 0a324ca68..fdbced232 100644
--- a/frontends/amiga/gui.c
+++ b/frontends/amiga/gui.c
@@ -1063,10 +1063,10 @@ static void gui_init2(int argc, char** argv)
if(!notalreadyrunning)
{
STRPTR sendcmd = NULL;
- char newtab[4] = "\0";
+ char newtab[11] = "\0";
if(nsoption_bool(tab_new_session) == true) {
- strcpy(newtab, "TAB");
+ strcpy(newtab, "TAB ACTIVE");
}
if(temp_homepage_url) {
@@ -1078,12 +1078,8 @@ static void gui_init2(int argc, char** argv)
ami_arexx_self(sendcmd);
FreeVec(sendcmd);
- if((nsoption_bool(tab_new_session) == true) && (nsoption_bool(new_tab_is_active) == true)) {
- /* If we're opening a new tab and that tab will be active, bring the screen to the front.
- *\todo consider if we should be bringing the window to the front too.
- * If we're opening a new window, Intuition brings the screen to the front anyway. */
- ami_arexx_self("TOFRONT");
- }
+ /* Bring the screen to the front. Intuition may have already done this, but it doesn't hurt. */
+ ami_arexx_self("TOFRONT");
ami_quit=true;
return;