<AWT Dev> [8] Review Request for 8009911 : [macosx] SWT app freeze when going full screen using Java 7 on Mac

Petr Pchelko petr.pchelko at oracle.com
Mon May 20 23:36:07 PDT 2013

Hello, AWT Team.

Please review the fix for the issue:
The webrev is available at:

The problem:
When launching java with -XstatrOnFirstThread we were using dispatch_sync to start a Java main on the main thread. This blocked the main dispatch queue, so all the subsequent calls to GCD were never invoked. GCD is used a bit in our code, but it is used inside Cocoa, for example for fullscreen. 

The solution:
We now launch Java main using a performSelectorOnMaintThread, so we do not block GCD.

1. This also fixes the following SWT bug: https://bugs.eclipse.org/bugs/show_bug.cgi?id=388886
2. Although I have added OBJC syntax into java_md_macosx.c file, I did not rename it to .m, because:
	a. It is hard to update an old build system to compile with the new file name.
	b. It is already compiled with -x objective-c, so I will compile
	c. We would have lost all the hg history for this file.

With best regards. Petr.

More information about the awt-dev mailing list