diff --git a/CHANGELOG.md b/CHANGELOG.md index 3fcfb952..579d0cc6 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -12,6 +12,8 @@ FlatLaf Change Log - `HiDPIUtils.paintAtScale1x()` now supports rotated graphics. (issue #557) - Typography: No longer use `Consolas` or `Courier New` as monospaced font on Windows because they have bad vertically placement. +- Native window decorations (Windows 10/11 only): Do not use window decorations + if system property `sun.java2d.opengl` is `true` on Windows 10. (issue #540) ## 2.3 diff --git a/flatlaf-core/src/main/java/com/formdev/flatlaf/ui/FlatNativeWindowBorder.java b/flatlaf-core/src/main/java/com/formdev/flatlaf/ui/FlatNativeWindowBorder.java index 164e4a74..360f8336 100644 --- a/flatlaf-core/src/main/java/com/formdev/flatlaf/ui/FlatNativeWindowBorder.java +++ b/flatlaf-core/src/main/java/com/formdev/flatlaf/ui/FlatNativeWindowBorder.java @@ -42,11 +42,13 @@ import com.formdev.flatlaf.util.SystemInfo; public class FlatNativeWindowBorder { // can use window decorations if: - // - on Windows 10 + // - on Windows 10 or later + // - not if system property "sun.java2d.opengl" is true on Windows 10 // - not when running in JetBrains Projector, Webswing or WinPE // - not disabled via system property private static final boolean canUseWindowDecorations = SystemInfo.isWindows_10_orLater && + (SystemInfo.isWindows_11_orLater || !FlatSystemProperties.getBoolean( "sun.java2d.opengl", false )) && !SystemInfo.isProjector && !SystemInfo.isWebswing && !SystemInfo.isWinPE &&