summaryrefslogtreecommitdiffstats
path: root/src/classes/com/sun
diff options
context:
space:
mode:
Diffstat (limited to 'src/classes/com/sun')
-rw-r--r--src/classes/com/sun/opengl/impl/macosx/MacOSXOnscreenGLContext.java6
1 files changed, 6 insertions, 0 deletions
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 {