From aef69aefecbfb282a9b1d81a19625f00a8ba8bc9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Manuel=20H=C3=BCsers?= Date: Thu, 16 Oct 2025 22:21:02 +0200 Subject: [PATCH] upgpkg: discord 0.0.112-2: fix wayland Fix Wayland detection currently being broken in Electron 38 Remove now obsolete flags --- .SRCINFO | 2 +- PKGBUILD | 2 +- discord-launcher.sh | 8 +++++++- 3 files changed, 9 insertions(+), 3 deletions(-) diff --git a/.SRCINFO b/.SRCINFO index 4369806..4806b77 100644 --- a/.SRCINFO +++ b/.SRCINFO @@ -1,7 +1,7 @@ pkgbase = discord_arch_electron pkgdesc = Discord using system provided electron for increased security and performance pkgver = 0.0.112 - pkgrel = 1 + pkgrel = 2 epoch = 1 url = https://discord.com install = discord_arch_electron.install diff --git a/PKGBUILD b/PKGBUILD index bf87e00..98b940c 100644 --- a/PKGBUILD +++ b/PKGBUILD @@ -10,7 +10,7 @@ _pkgname=discord _electron=electron pkgname=${_pkgname}_arch_electron pkgver=0.0.112 -pkgrel=1 +pkgrel=2 epoch=1 pkgdesc="Discord using system provided ${_electron} for increased security and performance" arch=('any') diff --git a/discord-launcher.sh b/discord-launcher.sh index 02a3479..9e2f189 100644 --- a/discord-launcher.sh +++ b/discord-launcher.sh @@ -32,7 +32,13 @@ for line in "${MAPFILE[@]}"; do fi done +if [[ -e "${XDG_RUNTIME_DIR:-}/${WAYLAND_SOCKET:-}" || -e "${WAYLAND_DISPLAY:-}" || "${XDG_SESSION_TYPE:-}" == "wayland" ]]; then + # work around electron's broken wayland detection + # TODO: remove when Arch updates to an electron release that includes the fix + # https://github.com/electron/electron/pull/48301 + flags+=("--ozone-platform=wayland") +fi + exec /usr/bin/${electron} \ /usr/share/${name}/resources/app.asar \ - --ozone-platform-hint=auto \ "${flags[@]}" "$@"