Skip to content

Firefox add support for native wayland backend - #55119

Merged
flokli merged 2 commits into
NixOS:masterfrom
andir:firefox-wayland
Feb 11, 2019
Merged

flokli merged 2 commits into
NixOS:masterfrom
andir:firefox-wayland

Conversation

@andir

@andir andir commented Feb 3, 2019

Copy link
Copy Markdown
Member
Motivation for this change

I started playing with sway and wayland in general and figured that Firefox did not yet come with support for the native GDK backend.

Things done
  • Tested using sandboxing (nix.useSandbox on NixOS, or option sandbox in nix.conf on non-NixOS)
  • Built on platform(s)
    • NixOS
    • macOS
    • other Linux distributions
  • Tested via one or more NixOS test(s) if existing and applicable for the change (look inside nixos/tests)
  • Tested compilation of all pkgs that depend on this change using nix-shell -p nox --run "nox-review wip"
  • Tested execution of all binary files (usually in ./result/bin/)
  • Determined the impact on package closure size (by running nix path-info -S before and after)
  • Assured whether relevant documentation is up to date
  • Fits CONTRIBUTING.md.

andir added 2 commits February 3, 2019 11:36
This adds support for building firefox with the gtk wayland backend. It
should work on all the flavors that use >=gtk3. Using the wayland
still allows using the X11 backend.
The firefox wrapper now supports setting the GDK_BACKEND to wayland
which is useful in cases where firefox would be started from within an
X-Application inside of wayland. GTK/GDK would otherwise default to the
X11 backend in those situations.

The intention is that people that are using wayland primarily pull in
the new `firefox-wayland` top-level attribute into their environments
instead of just `firefox`. Firefox will then always be started with the
correct rendering backend.
icecat-unwrapped = firefoxPackages.icecat;

firefox = wrapFirefox firefox-unwrapped { };
firefox-wayland = wrapFirefox firefox-unwrapped { gdkWayland = true; };

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why not set the default for gdkWayland to true and remove this separate package? Or is Wayland version incompatible with X11 desktops?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The problem is that you can spawn firefox from an XWayland window within a wayland session (e.g. sway) and then firefox also defaults to using XWayland. By setting the desired backend explicitly you can workaround that issue. Most distributions (AFIK fedora & ubuntu) ship a shim package for the very same purpose.

@GrahamcOfBorg GrahamcOfBorg added 10.rebuild-darwin: 11-100 This PR causes between 11 and 100 packages to rebuild on Darwin. 10.rebuild-linux: 11-100 This PR causes between 11 and 100 packages to rebuild on Linux. labels Feb 3, 2019
@flokli
flokli merged commit c569643 into NixOS:master Feb 11, 2019
@primeos primeos mentioned this pull request Jun 19, 2019
6 of 13 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

10.rebuild-darwin: 11-100 This PR causes between 11 and 100 packages to rebuild on Darwin. 10.rebuild-linux: 11-100 This PR causes between 11 and 100 packages to rebuild on Linux.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants