From e587f2a724c79d50118f717cc29fba78cad0feeb Mon Sep 17 00:00:00 2001
From: Sven Gothel <sgothel@jausoft.com>
Date: Tue, 22 Feb 2011 14:21:29 +0100
Subject: NativeWindow NativeSurface lock/unlock Surface cleanup ; NEWT
 WindowImpl lock/unlock Surface fix

- Rename lock to surfaceLock to determine it's use

- NEWT's WindowImpl windowLock usage is not sufficient for lock/unlock surface.
  Using distinguished surfaceLock for proper recursion count on lock/unlock surface.
---
 src/newt/classes/com/jogamp/newt/opengl/GLWindow.java | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

(limited to 'src/newt/classes/com')

diff --git a/src/newt/classes/com/jogamp/newt/opengl/GLWindow.java b/src/newt/classes/com/jogamp/newt/opengl/GLWindow.java
index f3fab7bce..fee188768 100644
--- a/src/newt/classes/com/jogamp/newt/opengl/GLWindow.java
+++ b/src/newt/classes/com/jogamp/newt/opengl/GLWindow.java
@@ -76,14 +76,14 @@ public class GLWindow implements GLAutoDrawable, Window, NEWTEventConsumer {
         ((WindowImpl)this.window).setHandleDestroyNotify(false);
         window.addWindowListener(new WindowAdapter() {
                 public void windowRepaint(WindowUpdateEvent e) {
-                    if( !GLWindow.this.window.isSurfaceLockedByOtherThread() && !GLWindow.this.helper.isExternalAnimatorAnimating() ) {
+                    if( !GLWindow.this.window.isWindowLockedByOtherThread() && !GLWindow.this.helper.isExternalAnimatorAnimating() ) {
                         display();
                     }
                 }
 
                 public void windowResized(WindowEvent e) {
                     sendReshape = true;
-                    if( !GLWindow.this.window.isSurfaceLockedByOtherThread() && !GLWindow.this.helper.isExternalAnimatorAnimating() ) {
+                    if( !GLWindow.this.window.isWindowLockedByOtherThread() && !GLWindow.this.helper.isExternalAnimatorAnimating() ) {
                         display();
                     }
                 }
@@ -99,8 +99,8 @@ public class GLWindow implements GLAutoDrawable, Window, NEWTEventConsumer {
                             if(isPaused) {
                                 ctrl.resume();
                             }
-                        } else if (GLWindow.this.window.isSurfaceLockedByOtherThread()) {
-                            // Surface is locked by another thread
+                        } else if (GLWindow.this.window.isWindowLockedByOtherThread()) {
+                            // Window is locked by another thread
                             // Flag that destroy should be performed on the next
                             // attempt to display.
                             sendDestroy = true;
-- 
cgit v1.2.3