mirror of
https://github.com/JetBrains/JetBrainsRuntime.git
synced 2025-12-06 09:29:38 +01:00
JBR-8048: only log system property 'awt.mac.flushBuffers.invokeLater' if manually set
This commit is contained in:
@@ -1189,21 +1189,29 @@ public class CPlatformWindow extends CFRetainedResource implements PlatformWindo
|
||||
private static int getInvokeLaterMode() {
|
||||
final String invokeLaterKey = "awt.mac.flushBuffers.invokeLater";
|
||||
final String invokeLaterArg = AccessController.doPrivileged(
|
||||
new GetPropertyAction(invokeLaterKey, "auto"));
|
||||
new GetPropertyAction(invokeLaterKey));
|
||||
final int result;
|
||||
switch (invokeLaterArg.toLowerCase()) {
|
||||
default:
|
||||
case "auto":
|
||||
result = INVOKE_LATER_AUTO;
|
||||
break;
|
||||
case "false":
|
||||
result = INVOKE_LATER_DISABLED;
|
||||
break;
|
||||
case "true":
|
||||
result = INVOKE_LATER_ENABLED;
|
||||
break;
|
||||
if (invokeLaterArg == null) {
|
||||
// default = 'auto':
|
||||
result = INVOKE_LATER_AUTO;
|
||||
} else {
|
||||
switch (invokeLaterArg.toLowerCase()) {
|
||||
default:
|
||||
case "auto":
|
||||
result = INVOKE_LATER_AUTO;
|
||||
break;
|
||||
case "false":
|
||||
result = INVOKE_LATER_DISABLED;
|
||||
break;
|
||||
case "true":
|
||||
result = INVOKE_LATER_ENABLED;
|
||||
break;
|
||||
}
|
||||
logger.info("CPlatformWindow: property \"{0}={1}\", using invokeLater={2}.",
|
||||
invokeLaterKey, invokeLaterArg,
|
||||
(result == INVOKE_LATER_DISABLED) ? "false"
|
||||
: ((result == INVOKE_LATER_AUTO) ? "auto" : "true"));
|
||||
}
|
||||
logger.info("CPlatformWindow: using {0} = {1}.", invokeLaterKey, invokeLaterArg);
|
||||
return result;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user