From a1d5dfd4486faa101cbf3d33f45a9f36ec6f358f Mon Sep 17 00:00:00 2001 From: Martin Stransky Date: Mon, 4 Feb 2019 14:56:47 +0100 Subject: Updated launcher scripts --- firefox-x11.sh.in | 1 + firefox.sh.in | 9 +++++++++ firefox.spec | 8 ++++---- 3 files changed, 14 insertions(+), 4 deletions(-) diff --git a/firefox-x11.sh.in b/firefox-x11.sh.in index 9ad78e9..4ae4b0c 100644 --- a/firefox-x11.sh.in +++ b/firefox-x11.sh.in @@ -3,4 +3,5 @@ # Run Firefox on X11 backend # +export MOZ_DISABLE_WAYLAND=1 exec /usr/bin/firefox "$@" diff --git a/firefox.sh.in b/firefox.sh.in index 8bace48..06819d1 100644 --- a/firefox.sh.in +++ b/firefox.sh.in @@ -66,6 +66,15 @@ 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 Wayland backend? +## +if __DEFAULT_WAYLAND__ && ! [ $MOZ_DISABLE_WAYLAND ]; then + if [ "$XDG_CURRENT_DESKTOP" == "GNOME" ]; then + export MOZ_ENABLE_WAYLAND=1 + fi +fi + ## ## Set MOZ_GRE_CONF ## diff --git a/firefox.spec b/firefox.spec index b0880bd..a7df11c 100644 --- a/firefox.spec +++ b/firefox.spec @@ -602,14 +602,14 @@ desktop-file-install --dir %{buildroot}%{_datadir}/applications %{SOURCE29} # set up the firefox start script %if 0%{?wayland_backend_default} -%global x11_state false +%global wayland_default true %else -%global x11_state true +%global wayland_default false %endif %{__rm} -rf %{buildroot}%{_bindir}/firefox -%{__sed} -e 's/__DEFAULT_X11__/%{x11_state}/' %{SOURCE21} > %{buildroot}%{_bindir}/firefox - +%{__sed} -e 's/__DEFAULT_WAYLAND__/%{wayland_default}/' %{SOURCE21} > %{buildroot}%{_bindir}/firefox %{__chmod} 755 %{buildroot}%{_bindir}/firefox + %if 0%{?wayland_backend_default} %{__cat} %{SOURCE30} > %{buildroot}%{_bindir}/firefox-x11 %{__chmod} 755 %{buildroot}%{_bindir}/firefox-x11 -- cgit