From 711d743a8e99951648a3abbf66a05cf4d0027b31 Mon Sep 17 00:00:00 2001 From: Martijn Braam Date: Wed, 16 Mar 2022 00:43:19 +0100 Subject: [PATCH] main/postmarketos-ui-gnome: add firefox wayland config (MR 3008) Add MOZ_ENABLE_WAYLAND=1 to make firefox not use xwayland in Gnome --- main/postmarketos-ui-gnome/APKBUILD | 10 ++++++++-- main/postmarketos-ui-gnome/firefox-wayland.sh | 8 ++++++++ 2 files changed, 16 insertions(+), 2 deletions(-) create mode 100644 main/postmarketos-ui-gnome/firefox-wayland.sh diff --git a/main/postmarketos-ui-gnome/APKBUILD b/main/postmarketos-ui-gnome/APKBUILD index 5798cfb9c..3761f49aa 100644 --- a/main/postmarketos-ui-gnome/APKBUILD +++ b/main/postmarketos-ui-gnome/APKBUILD @@ -1,7 +1,7 @@ # Reference: https://postmarketos.org/uipkg # Maintainer: Martijn Braam pkgname=postmarketos-ui-gnome -pkgver=2 +pkgver=3 pkgrel=0 pkgdesc="(Wayland) Gnome Shell" url="https://gnome.org/" @@ -16,8 +16,14 @@ depends=" xwayland " install="$pkgname.post-install $pkgname.post-upgrade" +source="firefox-wayland.sh" options="!check pmb:gpu-accel" package() { - mkdir -p "$pkgdir" + install -Dm755 \ + "$srcdir"/firefox-wayland.sh \ + -t "$pkgdir"/etc/profile.d/ } +sha512sums=" +0d9ec58be7dc354e181989c7f08e7d4dd93fefd06a99e784b87fe898479dd47a40dfa9689c6a63ebdc04bf87883a270686aec27f7cc34cb21ec0f370a4afe2d8 firefox-wayland.sh +" diff --git a/main/postmarketos-ui-gnome/firefox-wayland.sh b/main/postmarketos-ui-gnome/firefox-wayland.sh new file mode 100644 index 000000000..dac15fb90 --- /dev/null +++ b/main/postmarketos-ui-gnome/firefox-wayland.sh @@ -0,0 +1,8 @@ +#!/bin/sh + +# Firefox does run with xwayland by default on Gnome, this setting +# makes it pick the wayland backend without setting GDK_BACKEND=wayland +# which causes more issues in the Gnome stack +if [ "$XDG_SESSION_TYPE" = "wayland" ]; then + export MOZ_ENABLE_WAYLAND=1 +fi