diff options
Diffstat (limited to 'src/newt/classes/com')
-rw-r--r-- | src/newt/classes/com/jogamp/newt/opengl/GLWindow.java | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/src/newt/classes/com/jogamp/newt/opengl/GLWindow.java b/src/newt/classes/com/jogamp/newt/opengl/GLWindow.java index 345d92bc1..25249cee4 100644 --- a/src/newt/classes/com/jogamp/newt/opengl/GLWindow.java +++ b/src/newt/classes/com/jogamp/newt/opengl/GLWindow.java @@ -34,6 +34,8 @@ package com.jogamp.newt.opengl; +import java.security.AccessController; +import java.security.PrivilegedAction; import java.util.List; import javax.media.nativewindow.AbstractGraphicsConfiguration; @@ -529,6 +531,24 @@ public class GLWindow extends GLAutoDrawableBase implements GLAutoDrawable, Wind savedAnimator.resume(); } } + + @SuppressWarnings("deprecation") + @Override + public void shutdownRenderingAction() { + final GLAnimatorControl anim = GLWindow.this.getAnimator(); + if ( null != anim && anim.isAnimating() ) { + AccessController.doPrivileged(new PrivilegedAction<Object>() { + public Object run() { + final Thread animThread = anim.getThread(); + if( null != animThread ) { + try { + animThread.stop(); + } catch(Throwable t) { } + } + return null; + } } ); + } + } } //---------------------------------------------------------------------- |