diff options
author | Sven Gothel <[email protected]> | 2010-11-19 21:52:45 +0100 |
---|---|---|
committer | Sven Gothel <[email protected]> | 2010-11-19 21:52:45 +0100 |
commit | 6f73de7c5bb85d0175c8dda7c55317923017bbe0 (patch) | |
tree | 836d852d15d366242585b08c646a99fc5f595778 /src | |
parent | 473e25e758ece83b1eff2722f13dc4d65ee81c27 (diff) |
minor formatting
Diffstat (limited to 'src')
-rw-r--r-- | src/newt/classes/com/jogamp/newt/opengl/GLWindow.java | 17 |
1 files changed, 6 insertions, 11 deletions
diff --git a/src/newt/classes/com/jogamp/newt/opengl/GLWindow.java b/src/newt/classes/com/jogamp/newt/opengl/GLWindow.java index dfc2651e7..dc5c12b58 100644 --- a/src/newt/classes/com/jogamp/newt/opengl/GLWindow.java +++ b/src/newt/classes/com/jogamp/newt/opengl/GLWindow.java @@ -87,26 +87,21 @@ public class GLWindow implements GLAutoDrawable, Window, NEWTEventConsumer { public void windowDestroyNotify(WindowEvent e) { // Is an animator thread perform rendering? if (GLWindow.this.helper.isExternalAnimatorAnimating()) { - // Pause animations before initiating destroy. - GLAnimatorControl ctrl = GLWindow.this.helper - .getAnimator(); + // Pause animations before initiating safe destroy. + GLAnimatorControl ctrl = GLWindow.this.helper.getAnimator(); ctrl.pause(); destroy(); - // Resume animations. ctrl.resume(); - } - // Is the surface locked another thread? - else if (GLWindow.this.window - .isSurfaceLockedByOtherThread()) { + } else if (GLWindow.this.window.isSurfaceLockedByOtherThread()) { + // Surface is locked by another thread // Flag that destroy should be performed on the next // attempt to display. sendDestroy = true; - } - else { + } else { // Without an external thread animating or locking the - // surface, we should be safe. + // surface, we are safe. destroy (); } } |