diff options
-rwxr-xr-x | make/scripts/tests.sh | 2 | ||||
-rw-r--r-- | src/nativewindow/classes/jogamp/nativewindow/NullToolkitLock.java | 8 |
2 files changed, 4 insertions, 6 deletions
diff --git a/make/scripts/tests.sh b/make/scripts/tests.sh index 0908ef1fd..9e384d59f 100755 --- a/make/scripts/tests.sh +++ b/make/scripts/tests.sh @@ -138,7 +138,7 @@ function jrun() { #D_ARGS="-Djogl.debug.GLCanvas" #D_ARGS="-Djogl.debug.GLContext -Dnativewindow.debug.X11Util.XSync" #D_ARGS="-Dnativewindow.debug.X11Util.XSync -Dnativewindow.debug.ToolkitLock.TraceLock" - D_ARGS="-Dnativewindow.debug.X11Util -Dnativewindow.debug.X11Util.XSync -Dnativewindow.debug.NullToolkitLock.InvalidLocked -Dnativewindow.debug.NativeWindow" + D_ARGS="-Dnativewindow.debug.NativeWindow" #D_ARGS="-Dnativewindow.debug.ToolkitLock" #D_ARGS="-Djogl.debug.graph.curve -Djogl.debug.GLSLCode -Djogl.debug.TraceGL" #D_ARGS="-Djogl.debug.graph.curve -Djogl.debug.GLSLState" diff --git a/src/nativewindow/classes/jogamp/nativewindow/NullToolkitLock.java b/src/nativewindow/classes/jogamp/nativewindow/NullToolkitLock.java index 211e15955..5fc5fe376 100644 --- a/src/nativewindow/classes/jogamp/nativewindow/NullToolkitLock.java +++ b/src/nativewindow/classes/jogamp/nativewindow/NullToolkitLock.java @@ -28,6 +28,7 @@ package jogamp.nativewindow; +import javax.media.nativewindow.NativeWindowFactory; import javax.media.nativewindow.ToolkitLock; /** @@ -35,8 +36,6 @@ import javax.media.nativewindow.ToolkitLock; * without any locking. Since there is no locking it all, it is intrinsically recursive. */ public class NullToolkitLock implements ToolkitLock { - public static final boolean INVALID_LOCKED = Debug.isPropertyDefined("nativewindow.debug.NullToolkitLock.InvalidLocked", true); - /** Singleton via {@link NativeWindowFactoryImpl#getNullToolkitLock()} */ protected NullToolkitLock() { } @@ -55,9 +54,8 @@ public class NullToolkitLock implements ToolkitLock { @Override public final void validateLocked() throws RuntimeException { - /* nop */ - if(INVALID_LOCKED) { - throw new RuntimeException("NullToolkitLock does not lock"); + if( NativeWindowFactory.requiresToolkitLock() ) { + throw new RuntimeException("NullToolkitLock does not lock, but locking is required."); } } |