Only use upload painter on windows

This commit is contained in:
crschnick 2024-07-02 13:05:43 +00:00
parent ddefa34167
commit ca4048570a
2 changed files with 7 additions and 3 deletions

View file

@ -10,6 +10,7 @@ import javafx.application.Platform;
import lombok.Getter; import lombok.Getter;
import lombok.Setter; import lombok.Setter;
import org.apache.commons.lang3.SystemUtils;
import java.awt.*; import java.awt.*;
import java.util.Optional; 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 { try {
CountDownLatch latch = new CountDownLatch(1); CountDownLatch latch = new CountDownLatch(1);
Platform.setImplicitExit(false); Platform.setImplicitExit(false);

View file

@ -125,9 +125,7 @@ project.ext {
// Disable this for now as it requires Windows 10+ // Disable this for now as it requires Windows 10+
// '-XX:+UseZGC', // '-XX:+UseZGC',
"-Dvisualvm.display.name=XPipe", "-Dvisualvm.display.name=XPipe",
"-Djavafx.preloader=io.xpipe.app.core.AppPreloader", "-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"
] ]
if (org.gradle.internal.os.OperatingSystem.current().isMacOsX()) { if (org.gradle.internal.os.OperatingSystem.current().isMacOsX()) {
jvmRunArgs += ["-Dapple.awt.application.appearance=system"] jvmRunArgs += ["-Dapple.awt.application.appearance=system"]