summaryrefslogtreecommitdiffstats
path: root/src/classes/com/sun/opengl/impl/x11
diff options
context:
space:
mode:
Diffstat (limited to 'src/classes/com/sun/opengl/impl/x11')
-rw-r--r--src/classes/com/sun/opengl/impl/x11/X11OnscreenGLContext.java10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/classes/com/sun/opengl/impl/x11/X11OnscreenGLContext.java b/src/classes/com/sun/opengl/impl/x11/X11OnscreenGLContext.java
index f4f4c7094..908257ba1 100644
--- a/src/classes/com/sun/opengl/impl/x11/X11OnscreenGLContext.java
+++ b/src/classes/com/sun/opengl/impl/x11/X11OnscreenGLContext.java
@@ -68,7 +68,7 @@ public class X11OnscreenGLContext extends X11GLContext {
}
return super.makeCurrentImpl();
} finally {
- if (optimizationEnabled) {
+ if (isOptimizable()) {
if (lockRes != X11OnscreenGLDrawable.LOCK_SURFACE_NOT_READY) {
drawable.unlockSurface();
}
@@ -77,10 +77,10 @@ public class X11OnscreenGLContext extends X11GLContext {
}
protected void releaseImpl() throws GLException {
- if (!optimizationEnabled) {
- try {
- super.releaseImpl();
- } finally {
+ try {
+ super.releaseImpl();
+ } finally {
+ if (!isOptimizable()) {
drawable.unlockSurface();
}
}