src/macosx/native/sun/awt/splashscreen/splashscreen_sys.m
Print this page
@@ -140,13 +140,18 @@
initFormat(&splash->screenFormat, 0xff << 8,
0xff << 16, 0xff << 24, 0xff << 0);
splash->screenFormat.byteOrder = 1 ? BYTE_ORDER_LSBFIRST : BYTE_ORDER_MSBFIRST;
splash->screenFormat.depthBytes = 4;
+ // If this property is present we are running SWT and should not start a runLoop
+ char envVar[80];
+ snprintf(envVar, sizeof(envVar), "JAVA_STARTED_ON_FIRST_THREAD_%d", getpid());
+ if (getenv(envVar) == NULL) {
[JNFRunLoop performOnMainThreadWaiting:NO withBlock:^() {
[NSApplicationAWT runAWTLoopWithApp:[NSApplicationAWT sharedApplication]];
}];
+ }
}
void
SplashCleanupPlatform(Splash * splash) {
splash->maskRequired = 0;