From 6c9999ca8d0722bfb3a945dd4bea666eb4a028cc Mon Sep 17 00:00:00 2001 From: Matthias Baesken Date: Fri, 19 Dec 2025 14:37:42 +0000 Subject: [PATCH] 8373984: Check for macos 11 in CGraphicsDevice.m can be removed Reviewed-by: prr, kizune --- .../native/libawt_lwawt/awt/CGraphicsDevice.m | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) diff --git a/src/java.desktop/macosx/native/libawt_lwawt/awt/CGraphicsDevice.m b/src/java.desktop/macosx/native/libawt_lwawt/awt/CGraphicsDevice.m index 32164493f9f..70f0741347a 100644 --- a/src/java.desktop/macosx/native/libawt_lwawt/awt/CGraphicsDevice.m +++ b/src/java.desktop/macosx/native/libawt_lwawt/awt/CGraphicsDevice.m @@ -60,16 +60,14 @@ static int getBPPFromModeString(CFStringRef mode) } static BOOL isValidDisplayMode(CGDisplayModeRef mode) { - // Workaround for apple bug FB13261205, since it only affects arm based macs - // and arm support started with macOS 11 ignore the workaround for previous versions - if (@available(macOS 11, *)) { - if (architecture == -1) { - architecture = [[NSRunningApplication currentApplication] executableArchitecture]; - } - if (architecture == NSBundleExecutableArchitectureARM64) { - return (CGDisplayModeGetPixelWidth(mode) >= 800); - } + // Workaround for apple bug FB13261205, only affects arm based macs + if (architecture == -1) { + architecture = [[NSRunningApplication currentApplication] executableArchitecture]; } + if (architecture == NSBundleExecutableArchitectureARM64) { + return (CGDisplayModeGetPixelWidth(mode) >= 800); + } + return (1 < CGDisplayModeGetWidth(mode) && 1 < CGDisplayModeGetHeight(mode)); }