Skip to content

Commit

Permalink
fixes for firefox)))
Browse files Browse the repository at this point in the history
  • Loading branch information
henrypp committed Nov 27, 2018
1 parent 97f42f7 commit 4eee60f
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions src/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -161,10 +161,16 @@ void init_browser_info (BROWSER_INFORMATION* pbi)
pbi->is_waitdownloadend = true;
}
}
else if (arga[i][0] == L'-' && arga[i][1] == L'-')
else if (arga[i][0] == L'-')
{
if (_wcsnicmp (arga[i], L"--new-window", 12) == 0)
if (
_wcsnicmp (arga[i], L"-new-tab", 8) == 0 ||
_wcsnicmp (arga[i], L"-new-window", 11) == 0 ||
_wcsnicmp (arga[i], L"--new-window", 12) == 0 ||
_wcsnicmp (arga[i], L"-new-instance", 13) == 0)
{
pbi->is_opennewwindow = true;
}

// there is Chromium arguments
StringCchCat (pbi->args, _countof (pbi->args), L" ");
Expand Down Expand Up @@ -278,7 +284,7 @@ void _app_openbrowser (BROWSER_INFORMATION* pbi)

const bool is_running = _app_browserisrunning (pbi);

if (is_running && !pbi->urls[0] && !pbi->is_opennewwindow)
if (is_running && !pbi->urls[0] && !pbi->is_opennewwindow)
return;

WCHAR args[2048] = {0};
Expand Down

0 comments on commit 4eee60f

Please sign in to comment.