From 50374b2b9bf4893f3ffa2255dfab513529a6e2ba Mon Sep 17 00:00:00 2001 From: zDEFz Date: Sat, 24 Aug 2024 20:46:57 +0200 Subject: [PATCH] Set _JAVA_AWT_WM_NONREPARENTING=1 on Wayland to fix blank FileBot UI on sway (#32) * Set`_JAVA_AWT_WM_NONREPARENTING=1 on Wayland to Fix FileBot UI IssueSet `_JAVA_AWT_WM_NONREPARENTING=1` on Wayland to Fix blank FileBot UI Issue This commit addresses an issue where the FileBot window appears blank or grey when running under Wayland. The problem is related to Java's AWT not handling window reparenting correctly in Wayland environments. By setting the `_JAVA_AWT_WM_NONREPARENTING` environment variable to `1`, we can avoid this issue. This workaround is particularly relevant for window managers like Sway. More details can be found in the related bug report: https://github.com/arch-noob/filebot/issues/30. * Update missing export for filebot.sh run * add some comments for sway _JAVA_AWT_WM_NONREPARENTING --- filebot.sh | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/filebot.sh b/filebot.sh index e0528973dc2b..77d0a7d8b756 100755 --- a/filebot.sh +++ b/filebot.sh @@ -20,6 +20,13 @@ LIBRARY_PATH="${FILEBOT_HOME}/lib/$(uname -m):/lib64" # as of 09.03.2024 seems relevant under KDE 6.0 using Wayland and nvidia/amd gpu WAYLAND_DISPLAY= +# Force _JAVA_AWT_WM_NONREPARENTING for wayland to avoid gray / blank screen +# see https://github.com/arch-noob/filebot/issues/30 and https://wiki.archlinux.org/title/Java +# relevant for sway or any other non-opiononated window manager +if [[ "$XDG_SESSION_TYPE" == "wayland" ]]; then + export _JAVA_AWT_WM_NONREPARENTING=1 +fi + # shellcheck disable=SC2086 java \ -Dapplication.deployment=aur \