From edddd7b6c296c09cadd8fcf46dc2befd564a92ea Mon Sep 17 00:00:00 2001 From: Ma'or Kadosh <4103412+it-is-wednesday@users.noreply.github.com> Date: Sun, 27 Sep 2020 21:12:47 +0300 Subject: [PATCH] explain how to globally add an environment variable to fix Java apps --- Home.md | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/Home.md b/Home.md index 1d9792c..4ec3f15 100644 --- a/Home.md +++ b/Home.md @@ -367,7 +367,13 @@ If you want to use a particular application's built-in window decorations over t #### Issues with Java applications -* Try to set `_JAVA_AWT_WM_NONREPARENTING=1` in your environment. [Source](https://github.com/swaywm/sway/issues/595) +* Try to set `_JAVA_AWT_WM_NONREPARENTING=1` in your environment ([Source](https://github.com/swaywm/sway/issues/595)). You can achieve this by appending the following snippet to your `~/.profile` file: +```sh +if [ "$XDG_SESSION_DESKTOP" = "sway" ] ; then + # https://github.com/swaywm/sway/issues/595 + export _JAVA_AWT_WM_NONREPARENTING=1 +fi +``` This seems to fix blank windows and menus that are drawn at a wrong offset to the selected menu item.