diff options
author | Sven Gothel <[email protected]> | 2010-07-26 18:48:16 -0700 |
---|---|---|
committer | Sven Gothel <[email protected]> | 2010-07-26 18:48:16 -0700 |
commit | c661333a3352b08ceabccd0b4559a060f77193b0 (patch) | |
tree | 09f161fdb99e54e89f9f73c3a5791633b86e8d10 /src/newt | |
parent | df161c9fcc1bc90d03e374e0eb8148424d4c5577 (diff) |
Newt: Remove static MacDisplay usage
Diffstat (limited to 'src/newt')
-rw-r--r-- | src/newt/classes/com/jogamp/newt/Display.java | 1 | ||||
-rw-r--r-- | src/newt/classes/com/jogamp/newt/util/MainThread.java | 6 |
2 files changed, 4 insertions, 3 deletions
diff --git a/src/newt/classes/com/jogamp/newt/Display.java b/src/newt/classes/com/jogamp/newt/Display.java index 91fff890c..a8ab8d520 100644 --- a/src/newt/classes/com/jogamp/newt/Display.java +++ b/src/newt/classes/com/jogamp/newt/Display.java @@ -209,6 +209,7 @@ public abstract class Display { f_dpy.dispatchMessages(); } } } ); edtUtil = MainThread.getSingleton(); + System.err.println("Display.getEDTUtil("+getFQName()+") Test EDT MainThread: "+edtUtil.getClass().getName()); // End JAU EDT Test .. } edtUtil.start(); diff --git a/src/newt/classes/com/jogamp/newt/util/MainThread.java b/src/newt/classes/com/jogamp/newt/util/MainThread.java index ed78c808d..ba886ade8 100644 --- a/src/newt/classes/com/jogamp/newt/util/MainThread.java +++ b/src/newt/classes/com/jogamp/newt/util/MainThread.java @@ -46,7 +46,6 @@ import javax.media.nativewindow.*; import com.jogamp.common.util.*; import com.jogamp.newt.*; import com.jogamp.newt.impl.*; -import com.jogamp.newt.impl.macosx.MacDisplay; /** * NEWT Utility class MainThread<P> @@ -178,7 +177,8 @@ public class MainThread implements EDTUtil { mainAction = new MainAction(mainClassName, mainClassArgs); if(NativeWindowFactory.TYPE_MACOSX.equals(NativeWindowFactory.getNativeWindowType(false))) { - MacDisplay.initSingleton(); + ReflectionUtil.callStaticMethod("com.jogamp.newt.impl.macosx.MacDisplay", "initSingleton", + null, null, MainThread.class.getClassLoader()); } if ( useMainThread ) { @@ -235,7 +235,7 @@ public class MainThread implements EDTUtil { private void initAWTReflection() { if(null == cAWTEventQueue) { - ClassLoader cl = MacDisplay.class.getClassLoader(); + ClassLoader cl = MainThread.class.getClassLoader(); cAWTEventQueue = ReflectionUtil.getClass("java.awt.EventQueue", true, cl); mAWTInvokeAndWait = ReflectionUtil.getMethod(cAWTEventQueue, "invokeAndWait", new Class[] { java.lang.Runnable.class }, cl); mAWTInvokeLater = ReflectionUtil.getMethod(cAWTEventQueue, "invokeLater", new Class[] { java.lang.Runnable.class }, cl); |