File tree Expand file tree Collapse file tree 2 files changed +13
-3
lines changed
src/java.desktop/macosx/native/libawt_lwawt/awt Expand file tree Collapse file tree 2 files changed +13
-3
lines changed Original file line number Diff line number Diff line change 11/*
2- * Copyright (c) 2012, 2019 , Oracle and/or its affiliates. All rights reserved.
2+ * Copyright (c) 2012, 2023 , Oracle and/or its affiliates. All rights reserved.
33 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
44 *
55 * This code is free software; you can redistribute it and/or modify it
3535#define DEFAULT_DEVICE_HEIGHT 768
3636#define DEFAULT_DEVICE_DPI 72
3737
38+ static NSInteger architecture = -1 ;
3839/*
3940 * Convert the mode string to the more convenient bits per pixel value
4041 */
@@ -58,7 +59,17 @@ static int getBPPFromModeString(CFStringRef mode)
5859 return 0 ;
5960}
6061
61- static BOOL isValidDisplayMode (CGDisplayModeRef mode){
62+ static BOOL isValidDisplayMode (CGDisplayModeRef mode) {
63+ // Workaround for apple bug FB13261205, since it only affects arm based macs
64+ // and arm support started with macOS 11 ignore the workaround for previous versions
65+ if (@available (macOS 11 , *)) {
66+ if (architecture == -1 ) {
67+ architecture = [[NSRunningApplication currentApplication ] executableArchitecture ];
68+ }
69+ if (architecture == NSBundleExecutableArchitectureARM64) {
70+ return (CGDisplayModeGetPixelWidth (mode) >= 800 );
71+ }
72+ }
6273 return (1 < CGDisplayModeGetWidth (mode) && 1 < CGDisplayModeGetHeight (mode));
6374}
6475
Original file line number Diff line number Diff line change @@ -462,7 +462,6 @@ java/awt/KeyboardFocusmanager/TypeAhead/MenuItemActivatedTest/MenuItemActivatedT
462462java/awt/Window/GetScreenLocation/GetScreenLocationTest.java 8225787 linux-x64
463463java/awt/Dialog/MakeWindowAlwaysOnTop/MakeWindowAlwaysOnTop.java 8266243 macosx-aarch64
464464java/awt/dnd/BadSerializationTest/BadSerializationTest.java 8277817 linux-x64,windows-x64
465- java/awt/GraphicsDevice/CheckDisplayModes.java 8266242 macosx-aarch64
466465java/awt/GraphicsDevice/DisplayModes/UnknownRefrshRateTest.java 8286436 macosx-aarch64
467466java/awt/image/multiresolution/MultiresolutionIconTest.java 8291979 linux-x64,windows-all
468467java/awt/event/SequencedEvent/MultipleContextsFunctionalTest.java 8305061 macosx-x64
You can’t perform that action at this time.
0 commit comments