mirror of
https://github.com/shadowfacts/lwjgl2-arm64.git
synced 2026-04-05 22:45:50 +00:00
Mac OS X: Add a Toolkit.getDefaultToolkit() incantation to MacOSXSysImplementation to avoid hangs on Mac OS X 10.3
This commit is contained in:
parent
83ac2f22d0
commit
1e5b712747
2 changed files with 8 additions and 1 deletions
|
|
@ -34,6 +34,7 @@ package org.lwjgl;
|
|||
import java.lang.reflect.Method;
|
||||
import java.security.AccessController;
|
||||
import java.security.PrivilegedExceptionAction;
|
||||
import java.awt.Toolkit;
|
||||
|
||||
/**
|
||||
*
|
||||
|
|
@ -42,6 +43,11 @@ import java.security.PrivilegedExceptionAction;
|
|||
* $Id$
|
||||
*/
|
||||
class MacOSXSysImplementation extends J2SESysImplementation {
|
||||
static {
|
||||
// Make sure AWT is properly initialized. This avoids hangs on Mac OS X 10.3
|
||||
Toolkit.getDefaultToolkit();
|
||||
}
|
||||
|
||||
public boolean openURL(String url) {
|
||||
try {
|
||||
Method openURL_method = (Method)AccessController.doPrivileged(new PrivilegedExceptionAction() {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue