Native window decorations: do not use window decorations if system property sun.java2d.opengl is true on Windows 10 (issue #540)

This commit is contained in:
Karl Tauber
2022-07-02 00:29:29 +02:00
parent b82ee2ef61
commit 23bac7e5fd
2 changed files with 5 additions and 1 deletions

View File

@@ -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

View File

@@ -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 &&