mirror of
https://github.com/JetBrains/JetBrainsRuntime.git
synced 2025-12-06 09:29:38 +01:00
JBR-3127: set NSWindowAllowsImplicitFullScreen=NO
fixed JBR-3127 Modal dialogs invoked from modal or floating dialogs are opened in full screen (cherry picked from commit0b8ff1a7e6) JBR-3127: add possibility to load NSJavaVirtualMachine JavaVM framework is deprecated but this class is still checked by AppKit, see https://youtrack.jetbrains.com/issue/JBR-3127#focus=Comments-27-4684465.0-0 (cherry picked from commitbe6a2c4f0c) (cherry picked from commitd690d68315)
This commit is contained in:
@@ -156,6 +156,28 @@ AWT_ASSERT_APPKIT_THREAD;
|
||||
}
|
||||
|
||||
[super finishLaunching];
|
||||
|
||||
// fix for JBR-3127 Modal dialogs invoked from modal or floating dialogs are opened in full screen
|
||||
[defs setBool:NO forKey:@"NSWindowAllowsImplicitFullScreen"];
|
||||
|
||||
// temporary possibility to load deprecated NSJavaVirtualMachine (just for testing)
|
||||
// todo: remove when completely tested on BigSur
|
||||
// see https://youtrack.jetbrains.com/issue/JBR-3127#focus=Comments-27-4684465.0-0
|
||||
NSString * loadNSJVMProp = [PropertiesUtilities
|
||||
javaSystemPropertyForKey:@"apple.awt.application.instantiate.NSJavaVirtualMachine"
|
||||
withEnv:env];
|
||||
if ([@"true" isCaseInsensitiveLike:loadNSJVMProp]) {
|
||||
if (objc_lookUpClass("NSJavaVirtualMachine") != nil) {
|
||||
NSLog(@"objc class NSJavaVirtualMachine is already registered");
|
||||
} else {
|
||||
Class nsjvm = objc_allocateClassPair([NSObject class], "NSJavaVirtualMachine", 0);
|
||||
objc_registerClassPair(nsjvm);
|
||||
NSLog(@"registered class NSJavaVirtualMachine: %@", nsjvm);
|
||||
|
||||
id nsjvmInst = [[nsjvm alloc] init];
|
||||
NSLog(@"instantiated dummy NSJavaVirtualMachine: %@", nsjvmInst);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user