src/config/session.c: set _JAVA_AWT_WM_NONREPARENTING=1

This commit is contained in:
Johan Malm 2023-10-18 21:46:55 +01:00 committed by Consolatis
parent a1324c8cdc
commit 30502af0e5

View file

@ -107,6 +107,15 @@ session_environment_init(const char *dir)
*/
setenv("XDG_CURRENT_DESKTOP", "wlroots", 0);
/*
* Set default for _JAVA_AWT_WM_NONREPARENTING so that Java applications
* such as JetBrains/Intellij Idea do render blank windows and menus
* with incorrect offset. See https://github.com/swaywm/sway/issues/595
* May be overriden either by already having a value set or by the user
* supplied environment file.
*/
setenv("_JAVA_AWT_WM_NONREPARENTING", "1", 0);
char *environment = build_path(dir, "environment");
if (!environment) {
return;