diff --git a/CHANGELOG.md b/CHANGELOG.md index c80ef6f0..e1ed9665 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -92,6 +92,8 @@ FlatLaf Change Log #### Fixed bugs +- Native window decorations: Fixed `UnsatisfiedLinkError` on Windows 11 for ARM + processors. (issue #443) - MenuBar: Do not fill background if non-opaque and having custom background color. (issue #409) - InternalFrame: Fill background to avoid that parent may shine through internal diff --git a/flatlaf-core/src/main/java/com/formdev/flatlaf/ui/FlatWindowsNativeWindowBorder.java b/flatlaf-core/src/main/java/com/formdev/flatlaf/ui/FlatWindowsNativeWindowBorder.java index 62f21452..40ece944 100644 --- a/flatlaf-core/src/main/java/com/formdev/flatlaf/ui/FlatWindowsNativeWindowBorder.java +++ b/flatlaf-core/src/main/java/com/formdev/flatlaf/ui/FlatWindowsNativeWindowBorder.java @@ -90,6 +90,10 @@ class FlatWindowsNativeWindowBorder if( !SystemInfo.isWindows_10_orLater ) return null; + // requires x86 architecture + if( !SystemInfo.isX86 && !SystemInfo.isX86_64 ) + return null; + // load native library if( nativeLibrary == null ) { if( !SystemInfo.isJava_9_orLater ) { diff --git a/flatlaf-core/src/main/java/com/formdev/flatlaf/util/SystemInfo.java b/flatlaf-core/src/main/java/com/formdev/flatlaf/util/SystemInfo.java index eceecf9b..98cabbb5 100644 --- a/flatlaf-core/src/main/java/com/formdev/flatlaf/util/SystemInfo.java +++ b/flatlaf-core/src/main/java/com/formdev/flatlaf/util/SystemInfo.java @@ -39,7 +39,9 @@ public class SystemInfo public static final boolean isMacOS_10_15_Catalina_orLater; // OS architecture + /** @since 2 */ public static final boolean isX86; /** @since 1.1 */ public static final boolean isX86_64; + /** @since 2 */ public static final boolean isAARCH64; // Java versions public static final long javaVersion; @@ -76,7 +78,9 @@ public class SystemInfo // OS architecture String osArch = System.getProperty( "os.arch" ); + isX86 = osArch.equals( "x86" ); isX86_64 = osArch.equals( "amd64" ) || osArch.equals( "x86_64" ); + isAARCH64 = osArch.equals( "aarch64" ); // Java versions javaVersion = scanVersion( System.getProperty( "java.version" ) );