diff options
Diffstat (limited to 'src/nativewindow/classes')
5 files changed, 18 insertions, 10 deletions
diff --git a/src/nativewindow/classes/javax/media/nativewindow/DefaultGraphicsDevice.java b/src/nativewindow/classes/javax/media/nativewindow/DefaultGraphicsDevice.java index c2aa6fae9..b419fb29b 100644 --- a/src/nativewindow/classes/javax/media/nativewindow/DefaultGraphicsDevice.java +++ b/src/nativewindow/classes/javax/media/nativewindow/DefaultGraphicsDevice.java @@ -46,7 +46,7 @@ public class DefaultGraphicsDevice implements Cloneable, AbstractGraphicsDevice /** * Create an instance with the system default {@link ToolkitLock}, - * gathered via {@link NativeWindowFactory#createDefaultToolkitLock()}. + * gathered via {@link NativeWindowFactory#getDefaultToolkitLock(String)}. * @param type */ public DefaultGraphicsDevice(String type, String connection, int unitID) { @@ -60,7 +60,7 @@ public class DefaultGraphicsDevice implements Cloneable, AbstractGraphicsDevice /** * Create an instance with the system default {@link ToolkitLock}. - * gathered via {@link NativeWindowFactory#createDefaultToolkitLock()}. + * gathered via {@link NativeWindowFactory#createDefaultToolkitLock(String, long)}. * @param type * @param handle */ diff --git a/src/nativewindow/classes/javax/media/nativewindow/NativeWindowFactory.java b/src/nativewindow/classes/javax/media/nativewindow/NativeWindowFactory.java index c3b91ec50..bbc915f2c 100644 --- a/src/nativewindow/classes/javax/media/nativewindow/NativeWindowFactory.java +++ b/src/nativewindow/classes/javax/media/nativewindow/NativeWindowFactory.java @@ -335,7 +335,7 @@ public abstract class NativeWindowFactory { * <li> Otherwise return {@link jogamp.nativewindow.NullToolkitLock} </li> * </ul> */ - public static ToolkitLock getDefaultToolkitLock(String type) { + /* package */ static ToolkitLock getDefaultToolkitLock(String type) { if( requiresToolkitLock() ) { if( TYPE_X11 == type || TYPE_AWT == type && TYPE_X11 == getNativeWindowType(false) ) { if( isAWTAvailable() ) { @@ -346,7 +346,7 @@ public abstract class NativeWindowFactory { return NativeWindowFactoryImpl.getNullToolkitLock(); } - protected static ToolkitLock getAWTToolkitLock() { + /* package */ static ToolkitLock getAWTToolkitLock() { Object resO = ReflectionUtil.callMethod(null, jawtUtilGetJAWTToolkitMethod); if(resO instanceof ToolkitLock) { diff --git a/src/nativewindow/classes/javax/media/nativewindow/x11/X11GraphicsDevice.java b/src/nativewindow/classes/javax/media/nativewindow/x11/X11GraphicsDevice.java index 48fd63e3c..317d3f3e9 100644 --- a/src/nativewindow/classes/javax/media/nativewindow/x11/X11GraphicsDevice.java +++ b/src/nativewindow/classes/javax/media/nativewindow/x11/X11GraphicsDevice.java @@ -47,16 +47,18 @@ public class X11GraphicsDevice extends DefaultGraphicsDevice implements Cloneabl boolean closeDisplay = false; /** Constructs a new X11GraphicsDevice corresponding to the given connection and default - * {@link javax.media.nativewindow.ToolkitLock} via {@link NativeWindowFactory#createDefaultToolkitLock(java.lang.String, long)}.<br> + * {@link javax.media.nativewindow.ToolkitLock} via {@link NativeWindowFactory#getDefaultToolkitLock(String)}.<br> * Note that this is not an open connection, ie no native display handle exist. * This constructor exist to setup a default device connection. + * @see DefaultGraphicsDevice#DefaultGraphicsDevice(String, String, int) */ public X11GraphicsDevice(String connection, int unitID) { super(NativeWindowFactory.TYPE_X11, connection, unitID); } /** Constructs a new X11GraphicsDevice corresponding to the given native display handle and default - * {@link javax.media.nativewindow.ToolkitLock} via {@link NativeWindowFactory#createDefaultToolkitLock(java.lang.String, long)}. + * {@link javax.media.nativewindow.ToolkitLock} via {@link NativeWindowFactory#createDefaultToolkitLock(String, long)}. + * @see DefaultGraphicsDevice#DefaultGraphicsDevice(String, String, int, long) */ public X11GraphicsDevice(long display, int unitID) { // FIXME: derive unitID from connection could be buggy, one DISPLAY for all screens for example.. @@ -69,6 +71,7 @@ public class X11GraphicsDevice extends DefaultGraphicsDevice implements Cloneabl /** * @param display the Display connection * @param locker custom {@link javax.media.nativewindow.ToolkitLock}, eg to force null locking in NEWT + * @see DefaultGraphicsDevice#DefaultGraphicsDevice(String, String, int, long, ToolkitLock) */ public X11GraphicsDevice(long display, int unitID, ToolkitLock locker) { super(NativeWindowFactory.TYPE_X11, X11Util.XDisplayString(display), unitID, display, locker); diff --git a/src/nativewindow/classes/jogamp/nativewindow/jawt/JAWTUtil.java b/src/nativewindow/classes/jogamp/nativewindow/jawt/JAWTUtil.java index 45b55e46e..f4fa4b598 100644 --- a/src/nativewindow/classes/jogamp/nativewindow/jawt/JAWTUtil.java +++ b/src/nativewindow/classes/jogamp/nativewindow/jawt/JAWTUtil.java @@ -109,6 +109,10 @@ public class JAWTUtil { } static { + if(DEBUG) { + System.err.println("JAWTUtil initialization (JAWT/JNI/..."); + // Thread.dumpStack(); + } JAWTJNILibLoader.initSingleton(); JAWTJNILibLoader.loadNativeWindow("awt"); diff --git a/src/nativewindow/classes/jogamp/nativewindow/x11/X11Util.java b/src/nativewindow/classes/jogamp/nativewindow/x11/X11Util.java index 5c1839250..79b427ac0 100644 --- a/src/nativewindow/classes/jogamp/nativewindow/x11/X11Util.java +++ b/src/nativewindow/classes/jogamp/nativewindow/x11/X11Util.java @@ -97,11 +97,16 @@ public class X11Util { System.err.println("X11Util firstX11ActionOnProcess: "+firstX11ActionOnProcess+ ", XINITTHREADS_ALWAYS_ENABLED "+XINITTHREADS_ALWAYS_ENABLED+ ", requiresX11Lock "+requiresX11Lock); + // Thread.dumpStack(); } isInit = true; } } + public static synchronized boolean requiresToolkitLock() { + return requiresX11Lock; + } + public static void setX11ErrorHandler(boolean onoff, boolean quiet) { synchronized(setX11ErrorHandlerLock) { if(onoff) { @@ -121,10 +126,6 @@ public class X11Util { } } - public static boolean requiresToolkitLock() { - return requiresX11Lock; - } - public static void lockDefaultToolkit(long dpyHandle) { NativeWindowFactory.getDefaultToolkitLock().lock(); if(requiresX11Lock) { |