mirror of
https://github.com/JFormDesigner/FlatLaf.git
synced 2025-12-06 14:00:55 +03:00
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:
@@ -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
|
||||
|
||||
@@ -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 &&
|
||||
|
||||
Reference in New Issue
Block a user