From 6f73de7c5bb85d0175c8dda7c55317923017bbe0 Mon Sep 17 00:00:00 2001 From: Sven Gothel Date: Fri, 19 Nov 2010 21:52:45 +0100 Subject: minor formatting --- src/newt/classes/com/jogamp/newt/opengl/GLWindow.java | 17 ++++++----------- 1 file 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 (); } } -- cgit v1.2.3