Compare commits

...

3 Commits

Author SHA1 Message Date
MonoBot
73a0827914 Fonts release 2.221 2020-12-28 17:44:48 +03:00
Artem Bochkarev
8e6710213e JBR-2526: disable national layouts in osx-aarch64 2020-12-27 23:28:07 +03:00
Artem Bochkarev
1fe160783a Revert "JBR-2526: make CPlatformResponder logic the same as in openjdk"
This reverts commit d2ee9bd6
2020-12-27 23:11:36 +03:00
7 changed files with 6 additions and 6 deletions

View File

@@ -46,7 +46,6 @@ import java.util.Locale;import java.util.MissingResourceException;import java.ut
final class CPlatformResponder {
private static final PlatformLogger keyboardLog = PlatformLogger.getLogger("sun.lwawt.macosx.CPlatformResponder");
private static final boolean USE_FOKIN_LOGIC = Boolean.getBoolean("cplatformresponder.use.fokin.logic"); // NOTE: will be removed when Fokin's fix reverted
private final PlatformEventNotifier eventNotifier;
private final boolean isNpapiCallback;
@@ -301,13 +300,10 @@ final class CPlatformResponder {
characterToGetKeyCode = checkedChar;
}
char testCharIgnoringModifiers = USE_FOKIN_LOGIC ? characterToGetKeyCode: nsEvent.getCharactersIgnoringModifiers() != null && nsEvent.getCharactersIgnoringModifiers().length() > 0 ?
nsEvent.getCharactersIgnoringModifiers().charAt(0) : KeyEvent.CHAR_UNDEFINED;
// We use char candidate if modifiers are not used
// otherwise, we use char ignoring modifiers
int[] in = new int[] {
testCharIgnoringModifiers,
characterToGetKeyCode,
nsEvent.isHasDeadKey() ? 1 : 0,
nsEvent.getModifierFlags(),
nsEvent.getKeyCode(),

View File

@@ -11,7 +11,8 @@ public class KeyEventProcessing {
public final static String useNationalLayoutsOption = "com.sun.awt.use.national.layouts";
@Native
public final static boolean useNationalLayouts = "true".equals(
Util.getProperty(useNationalLayoutsOption, FontUtilities.isMacOSX ? "true" : "false"));
Util.getProperty(useNationalLayoutsOption,
FontUtilities.isMacOSX && !FontUtilities.isMacOSX_aarch64 ? "true" : "false"));
// Used on windows to emulate latin OEM keys on cyrillic keyboards
public final static String useLatinNonAlphaNumKeycodesOption = "com.sun.awt.useLatinNonAlphaNumKeycodes";

View File

@@ -50,6 +50,7 @@ public final class FontUtilities {
public static boolean isMacOSX;
public static boolean isMacOSX14;
public static boolean isMacOSX_aarch64;
public static boolean useJDKScaler;
@@ -96,6 +97,8 @@ public final class FontUtilities {
} catch (NumberFormatException e) {
}
}
String architecture = System.getProperty("os.arch");
isMacOSX_aarch64 = "aarch64".equals(architecture);
}
/* If set to "jdk", use the JDK's scaler rather than
* the platform one. This may be a no-op on platforms where