From c156bdf40d2f0e64b574ade52c5611d90a0b6273 Mon Sep 17 00:00:00 2001 From: Martin Weinelt Date: Tue, 15 Nov 2022 20:11:57 +0100 Subject: firefox, thunderbird, librewolf: Enable wayland support by default Enabling Wayland support by default prevents use of XWayland on Wayland systems, while correctly falling back to X11 when Wayland is unavailable in the current session. With the current packaging many people unnecessarily rely on the `firefox` attribute, which is suggested by nixos-generate-config, which in turn makes their Firefox use XWayland, when it shouldn't, which causes bugs with GNOME on Wayland: https://discourse.nixos.org/t/firefox-all-black-when-first-launched-after-login/21143 Using the Wayland-enabled Firefox was tested on pure X11 systems by contributors on the #nix-mozilla:nixos.org room and we are confident this change will not cause severe regressions. Even better, people can now toggle `MOZ_ENABLE_WAYLAND=<0|1>` in their environment to override this decision, should they feel the need to do so. --- pkgs/applications/networking/browsers/firefox/wrapper.nix | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'pkgs/applications/networking/browsers/firefox/wrapper.nix') diff --git a/pkgs/applications/networking/browsers/firefox/wrapper.nix b/pkgs/applications/networking/browsers/firefox/wrapper.nix index 963028ae321..378fe1f4039 100644 --- a/pkgs/applications/networking/browsers/firefox/wrapper.nix +++ b/pkgs/applications/networking/browsers/firefox/wrapper.nix @@ -33,7 +33,6 @@ let , wmClass ? null , extraNativeMessagingHosts ? [] , pkcs11Modules ? [] - , forceWayland ? false , useGlvnd ? true , cfg ? config.${applicationName} or {} @@ -170,7 +169,7 @@ let name = applicationName; exec = "${launcherName} %U"; inherit icon; - desktopName = "${desktopName}${nameSuffix}${lib.optionalString forceWayland " (Wayland)"}"; + desktopName = "${desktopName}${nameSuffix}"; startupNotify = true; startupWMClass = wmClass; terminal = false; @@ -309,7 +308,7 @@ let --set MOZ_ALLOW_DOWNGRADE 1 \ --prefix XDG_DATA_DIRS : "$GSETTINGS_SCHEMAS_PATH" \ --suffix XDG_DATA_DIRS : '${gnome.adwaita-icon-theme}/share' \ - ${lib.optionalString forceWayland "--set MOZ_ENABLE_WAYLAND 1"} \ + --set-default MOZ_ENABLE_WAYLAND 1 \ "''${oldWrapperArgs[@]}" ############################# # # -- cgit 1.4.1