|
From: <eli...@us...> - 2007-06-20 08:57:46
|
Revision: 2854
http://svn.sourceforge.net/java-game-lib/?rev=2854&view=rev
Author: elias_naur
Date: 2007-06-20 01:57:45 -0700 (Wed, 20 Jun 2007)
Log Message:
-----------
Mac OS X: Add a Toolkit.getDefaultToolkit() incantation to MacOSXSysImplementation to avoid hangs on Mac OS X 10.3
Modified Paths:
--------------
trunk/LWJGL/build.xml
trunk/LWJGL/src/java/org/lwjgl/MacOSXSysImplementation.java
Modified: trunk/LWJGL/build.xml
===================================================================
--- trunk/LWJGL/build.xml 2007-06-15 06:58:38 UTC (rev 2853)
+++ trunk/LWJGL/build.xml 2007-06-20 08:57:45 UTC (rev 2854)
@@ -307,7 +307,8 @@
<target name="all" description="Creates the Java archives and the natives for the current platform" depends="jars, compile_native"/>
<!-- Create ONLY the jar archives -->
- <target name="jars" description="Creates the Java archives ONLY and places them in libs/" depends="-initialize, generate-all, compile, -createjars">
+ <target name="jars" description="Creates the Java archives ONLY and places them in libs/" depends="-initialize, compile, -createjars">
+ <!-- <target name="jars" description="Creates the Java archives ONLY and places them in libs/" depends="-initialize, generate-all, compile, -createjars">-->
<move todir="libs/">
<fileset dir="${lwjgl.temp}/jar">
<include name="*.jar"/>
Modified: trunk/LWJGL/src/java/org/lwjgl/MacOSXSysImplementation.java
===================================================================
--- trunk/LWJGL/src/java/org/lwjgl/MacOSXSysImplementation.java 2007-06-15 06:58:38 UTC (rev 2853)
+++ trunk/LWJGL/src/java/org/lwjgl/MacOSXSysImplementation.java 2007-06-20 08:57:45 UTC (rev 2854)
@@ -34,6 +34,7 @@
import java.lang.reflect.Method;
import java.security.AccessController;
import java.security.PrivilegedExceptionAction;
+import java.awt.Toolkit;
/**
*
@@ -42,6 +43,11 @@
* $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() {
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|