From ca4048570afa65229926b277941eee541d174c5e Mon Sep 17 00:00:00 2001 From: crschnick Date: Tue, 2 Jul 2024 13:05:43 +0000 Subject: [PATCH] Only use upload painter on windows --- app/src/main/java/io/xpipe/app/util/PlatformState.java | 6 ++++++ build.gradle | 4 +--- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/app/src/main/java/io/xpipe/app/util/PlatformState.java b/app/src/main/java/io/xpipe/app/util/PlatformState.java index 09d77aa4a..f761febd8 100644 --- a/app/src/main/java/io/xpipe/app/util/PlatformState.java +++ b/app/src/main/java/io/xpipe/app/util/PlatformState.java @@ -10,6 +10,7 @@ import javafx.application.Platform; import lombok.Getter; import lombok.Setter; +import org.apache.commons.lang3.SystemUtils; import java.awt.*; import java.util.Optional; @@ -112,6 +113,11 @@ public enum PlatformState { } } + if (SystemUtils.IS_OS_WINDOWS_11) { + // This is primarily intended to fix Windows unified stage transparency issues (https://bugs.openjdk.org/browse/JDK-8329382) + System.setProperty("prism.forceUploadingPainter", "true"); + } + try { CountDownLatch latch = new CountDownLatch(1); Platform.setImplicitExit(false); diff --git a/build.gradle b/build.gradle index 3bc48e446..d2ef10fc7 100644 --- a/build.gradle +++ b/build.gradle @@ -125,9 +125,7 @@ project.ext { // Disable this for now as it requires Windows 10+ // '-XX:+UseZGC', "-Dvisualvm.display.name=XPipe", - "-Djavafx.preloader=io.xpipe.app.core.AppPreloader", - // This is primarily intended to fix Windows unified stage transparency issues (https://bugs.openjdk.org/browse/JDK-8329382) - "-Dprism.forceUploadingPainter=true" + "-Djavafx.preloader=io.xpipe.app.core.AppPreloader" ] if (org.gradle.internal.os.OperatingSystem.current().isMacOsX()) { jvmRunArgs += ["-Dapple.awt.application.appearance=system"]