From b80a46665ddabb1f5fa896a2fc37cbd476798411 Mon Sep 17 00:00:00 2001 From: Kenneth Russel Date: Wed, 19 Jul 2006 23:15:50 +0000 Subject: Fixed potential deadlock on OS X where JOGL could leave the surface locked on OS X when the window was zero-sized git-svn-id: file:///usr/local/projects/SUN/JOGL/git-svn/svn-server-sync/jogl/trunk@850 232f8b59-042b-4e1e-8c03-345bb8c30851 --- src/classes/com/sun/opengl/impl/macosx/MacOSXOnscreenGLContext.java | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/classes/com/sun/opengl/impl/macosx/MacOSXOnscreenGLContext.java b/src/classes/com/sun/opengl/impl/macosx/MacOSXOnscreenGLContext.java index f09f24e9d..1e6a263de 100644 --- a/src/classes/com/sun/opengl/impl/macosx/MacOSXOnscreenGLContext.java +++ b/src/classes/com/sun/opengl/impl/macosx/MacOSXOnscreenGLContext.java @@ -73,6 +73,12 @@ public class MacOSXOnscreenGLContext extends MacOSXGLContext { // of an ancestor, but this also wasn't sufficient and left garbage on the // screen in some situations. CGL.updateContext(nsContext); + } else { + if (!isOptimizable()) { + // This can happen if the window currently is zero-sized, for example. + // Make sure we don't leave the surface locked in this case. + drawable.unlockSurface(); + } } return ret; } finally { -- cgit v1.2.3