Skip to content

Commit ca0013c

Browse files
committed
fixed private browsing opening extra windows on firefox browsers
1 parent 3bee83f commit ca0013c

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

usr/lib/webapp-manager/common.py

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -331,19 +331,25 @@ def get_exec_string(self, browser, codename, custom_parameters, icon, isolate_pr
331331
name = "Webapp-" + codename
332332

333333
if profile_dir := firefox_type_map.get(browser.browser_type):
334+
# Firefox-based browsers
334335
profile_path = os.path.join(profile_dir, codename)
335336
exec_args += [
336337
"env",
337338
"XAPP_FORCE_GTKWINDOW_ICON=" + icon,
338339
browser.exec_path,
340+
]
341+
342+
# This needs to appear before the url
343+
if privatewindow:
344+
exec_args += ["--private-window"]
345+
346+
exec_args += [
339347
url,
340348
"--class", name,
341349
"--name", name,
342350
"--profile", profile_path,
343351
"--no-remote",
344352
]
345-
if privatewindow:
346-
exec_args += ["--private-window"]
347353

348354
# Create a Firefox profile
349355
shutil.copytree('/usr/share/webapp-manager/firefox/profile', profile_path, dirs_exist_ok = True)

0 commit comments

Comments
 (0)