aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/jogl/classes/com/jogamp/opengl/util/FPSAnimator.java6
-rw-r--r--src/nativewindow/classes/jogamp/nativewindow/jawt/JAWTUtil.java4
2 files changed, 8 insertions, 2 deletions
diff --git a/src/jogl/classes/com/jogamp/opengl/util/FPSAnimator.java b/src/jogl/classes/com/jogamp/opengl/util/FPSAnimator.java
index 284e2bcc9..fc364b67a 100644
--- a/src/jogl/classes/com/jogamp/opengl/util/FPSAnimator.java
+++ b/src/jogl/classes/com/jogamp/opengl/util/FPSAnimator.java
@@ -173,6 +173,9 @@ public class FPSAnimator extends AnimatorBase {
timer = null;
}
animThread = null;
+ try {
+ Thread.sleep(20); // ~ 1/60 hz wait, since we can't ctrl stopped threads
+ } catch (InterruptedException e) { }
} finally {
stateSync.unlock();
}
@@ -191,6 +194,9 @@ public class FPSAnimator extends AnimatorBase {
task = null;
}
animThread = null;
+ try {
+ Thread.sleep(20); // ~ 1/60 hz wait, since we can't ctrl stopped threads
+ } catch (InterruptedException e) { }
} finally {
stateSync.unlock();
}
diff --git a/src/nativewindow/classes/jogamp/nativewindow/jawt/JAWTUtil.java b/src/nativewindow/classes/jogamp/nativewindow/jawt/JAWTUtil.java
index 80dd5c402..044f02dca 100644
--- a/src/nativewindow/classes/jogamp/nativewindow/jawt/JAWTUtil.java
+++ b/src/nativewindow/classes/jogamp/nativewindow/jawt/JAWTUtil.java
@@ -102,9 +102,9 @@ public class JAWTUtil {
PrivilegedDataBlob1 d = new PrivilegedDataBlob1();
try {
d.sunToolkitClass = Class.forName("sun.awt.SunToolkit");
- d.sunToolkitAWTLockMethod = sunToolkitClass.getDeclaredMethod("awtLock", new Class[]{});
+ d.sunToolkitAWTLockMethod = d.sunToolkitClass.getDeclaredMethod("awtLock", new Class[]{});
d.sunToolkitAWTLockMethod.setAccessible(true);
- d.sunToolkitAWTUnlockMethod = sunToolkitClass.getDeclaredMethod("awtUnlock", new Class[]{});
+ d.sunToolkitAWTUnlockMethod = d.sunToolkitClass.getDeclaredMethod("awtUnlock", new Class[]{});
d.sunToolkitAWTUnlockMethod.setAccessible(true);
d.ok=true;
} catch (Exception e) {