aboutsummaryrefslogtreecommitdiffstats
path: root/src/newt/classes
diff options
context:
space:
mode:
Diffstat (limited to 'src/newt/classes')
-rw-r--r--src/newt/classes/com/jogamp/newt/NewtFactory.java13
1 files changed, 11 insertions, 2 deletions
diff --git a/src/newt/classes/com/jogamp/newt/NewtFactory.java b/src/newt/classes/com/jogamp/newt/NewtFactory.java
index 1bf47f4aa..b3e904310 100644
--- a/src/newt/classes/com/jogamp/newt/NewtFactory.java
+++ b/src/newt/classes/com/jogamp/newt/NewtFactory.java
@@ -34,6 +34,9 @@
package com.jogamp.newt;
+import java.security.AccessController;
+import java.security.PrivilegedAction;
+
import javax.media.nativewindow.AbstractGraphicsConfiguration;
import javax.media.nativewindow.AbstractGraphicsDevice;
import javax.media.nativewindow.AbstractGraphicsScreen;
@@ -41,6 +44,8 @@ import javax.media.nativewindow.CapabilitiesImmutable;
import javax.media.nativewindow.NativeWindow;
import javax.media.nativewindow.NativeWindowFactory;
+import com.jogamp.common.os.Platform;
+
import jogamp.newt.Debug;
import jogamp.newt.DisplayImpl;
import jogamp.newt.ScreenImpl;
@@ -54,8 +59,12 @@ public class NewtFactory {
// Work-around for initialization order problems on Mac OS X
// between native Newt and (apparently) Fmod
static {
- NativeWindowFactory.initSingleton(); // last resort ..
- WindowImpl.init(NativeWindowFactory.getNativeWindowType(true));
+ AccessController.doPrivileged(new PrivilegedAction<Object>() {
+ public Object run() {
+ NativeWindowFactory.initSingleton(); // last resort ..
+ WindowImpl.init(NativeWindowFactory.getNativeWindowType(true));
+ return null;
+ } } );
}
public static Class<?> getCustomClass(String packageName, String classBaseName) {