Repository navigation
Firefox add support for native wayland backend - #55119
Merged
Merged
Conversation
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.
infinisil
reviewed
Feb 3, 2019
| icecat-unwrapped = firefoxPackages.icecat; | ||
|
|
||
| firefox = wrapFirefox firefox-unwrapped { }; | ||
| firefox-wayland = wrapFirefox firefox-unwrapped { gdkWayland = true; }; |
Member
There was a problem hiding this comment.
Why not set the default for gdkWayland to true and remove this separate package? Or is Wayland version incompatible with X11 desktops?
Member
Author
There was a problem hiding this comment.
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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
sandboxinnix.confon non-NixOS)nix-shell -p nox --run "nox-review wip"./result/bin/)nix path-info -Sbefore and after)