Skip to content

Commit

Permalink
Bug 305: Disable setting default browser on Windows
Browse files Browse the repository at this point in the history
Until we can pull in upstream changes to fix breakage in setting
the Mullvad Browser as default in Windows 10/11 we're disabling
the ability to do so via about:preferences as well as via the
startup query dialog
  • Loading branch information
bayounetta committed Jun 10, 2024
1 parent d82b468 commit dace2d0
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
5 changes: 4 additions & 1 deletion browser/components/preferences/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -1765,7 +1765,10 @@ var gMainPane = {
"@mozilla.org/xre/directory-provider;1"
].getService(Ci.nsIXREDirProvider);
// Flatpak does not support setting nor detection of default browser
if (!shellSvc || isInFlatpak || xreDirProvider.isPortableMode) {
// Mullvad Bug 298: the ability to set Mullvad as the default browser in
// Windows is currently not functioning so hide the DOM Element containing
// default browser settings on non-portable Windows installs as well
if (!shellSvc || isInFlatpak || xreDirProvider.isPortableMode || AppConstants.platform == "win") {
defaultBrowserBox.hidden = true;
return;
}
Expand Down
7 changes: 7 additions & 0 deletions browser/components/shell/ShellService.sys.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,13 @@ let ShellServiceInternal = {
*/
_checkedThisSession: false,
get shouldCheckDefaultBrowser() {
// Mullvad Bug 298: the ability to set Mullvad as the default browser in
// Windows is currently not functioning so in lieu of overwriting user prefs
// or shipping a new default return early here
if(AppConstants.platform == "win") {
return false;
}

// If we've already checked, the browser has been started and this is a
// new window open, and we don't want to check again.
if (this._checkedThisSession) {
Expand Down

0 comments on commit dace2d0

Please sign in to comment.