Use MOZ_ENABLE_WAYLAND to enable Wayland backend

This commit is contained in:
Martin Stransky 2019-02-04 14:31:04 +01:00
parent de8eeeeb6a
commit 5c3efe8a80
5 changed files with 13 additions and 22 deletions

View File

@ -3,5 +3,5 @@
# Run Firefox under Wayland
#
export GDK_BACKEND=wayland
export MOZ_ENABLE_WAYLAND=1
exec /usr/bin/firefox "$@"

View File

@ -3,5 +3,4 @@
# Run Firefox on X11 backend
#
export GDK_BACKEND=x11
exec /usr/bin/firefox "$@"

View File

@ -66,15 +66,6 @@ MOZ_EXTENSIONS_PROFILE_DIR="$HOME/.mozilla/extensions/{ec8030f7-c20a-464f-9b0e-1
MOZ_PROGRAM="$MOZ_DIST_BIN/$MOZ_FIREFOX_FILE"
MOZ_LAUNCHER="$MOZ_DIST_BIN/run-mozilla.sh"
##
## Enable X11 backend by default?
##
if __DEFAULT_X11__; then
if ! [ "$GDK_BACKEND" ]; then
export GDK_BACKEND=x11
fi
fi
##
## Set MOZ_GRE_CONF
##

View File

@ -74,7 +74,7 @@ ExcludeArch: armv7hl
Summary: Mozilla Firefox Web browser
Name: firefox
Version: 65.0
Release: 3%{?pre_tag}%{?dist}
Release: 4%{?pre_tag}%{?dist}
URL: https://www.mozilla.org/firefox/
License: MPLv1.1 or GPLv2+ or LGPLv2+
Source0: https://archive.mozilla.org/pub/firefox/releases/%{version}%{?pre_version}/source/firefox-%{version}%{?pre_version}.source.tar.xz
@ -332,7 +332,6 @@ This package contains results of tests executed during build.
# Wayland specific upstream patches
%if 0%{?fedora} > 28
# TODO
%patch574 -p1 -b .firefox-pipewire
%endif
%patch575 -p1 -b .1522780
@ -878,6 +877,9 @@ gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || :
#---------------------------------------------------------------------
%changelog
* Mon Feb 4 2019 Martin Stransky <stransky@redhat.com> - 65.0-4
- Added fix for mozbz#1522780
* Thu Jan 31 2019 Fedora Release Engineering <releng@fedoraproject.org> - 65.0-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild

View File

@ -1,17 +1,17 @@
diff --git a/toolkit/xre/nsAppRunner.cpp b/toolkit/xre/nsAppRunner.cpp
--- a/toolkit/xre/nsAppRunner.cpp
+++ b/toolkit/xre/nsAppRunner.cpp
@@ -3622,12 +3622,15 @@
diff -up firefox-65.0/toolkit/xre/nsAppRunner.cpp.1522780 firefox-65.0/toolkit/xre/nsAppRunner.cpp
--- firefox-65.0/toolkit/xre/nsAppRunner.cpp.1522780 2019-02-04 14:27:16.704591496 +0100
+++ firefox-65.0/toolkit/xre/nsAppRunner.cpp 2019-02-04 14:30:01.869913509 +0100
@@ -3839,12 +3839,14 @@ int XREMain::XRE_mainStartup(bool* aExit
bool disableWayland = true;
# if defined(MOZ_WAYLAND)
#if defined(MOZ_WAYLAND)
- // Make X11 backend the default one.
- // Enable Wayland backend only when GDK_BACKEND is set and
- // Gtk+ >= 3.22 where we can expect recent enough
+ // Enable Wayland on Gtk+ >= 3.22 where we can expect recent enough
// compositor & libwayland interface.
- // compositor & libwayland interface.
- disableWayland = (PR_GetEnv("GDK_BACKEND") == nullptr) ||
- (gtk_check_version(3, 22, 0) != nullptr);
+ // Enable Wayland on Gtk+ >= 3.22 where we can expect recent enough
+ disableWayland = (gtk_check_version(3, 22, 0) != nullptr);
+ if (!disableWayland) {
+ // Make X11 backend the default one unless MOZ_ENABLE_WAYLAND or
@ -19,7 +19,6 @@ diff --git a/toolkit/xre/nsAppRunner.cpp b/toolkit/xre/nsAppRunner.cpp
+ disableWayland = (PR_GetEnv("GDK_BACKEND") == nullptr) &&
+ (PR_GetEnv("MOZ_ENABLE_WAYLAND") == nullptr);
+ }
# endif
#endif
// On Wayland disabled builds read X11 DISPLAY env exclusively
// and don't care about different displays.