aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/classes/com/sun/opengl/impl/x11/glx/X11GLXContext.java10
1 files changed, 8 insertions, 2 deletions
diff --git a/src/classes/com/sun/opengl/impl/x11/glx/X11GLXContext.java b/src/classes/com/sun/opengl/impl/x11/glx/X11GLXContext.java
index 5312e29c9..f7ce249cb 100644
--- a/src/classes/com/sun/opengl/impl/x11/glx/X11GLXContext.java
+++ b/src/classes/com/sun/opengl/impl/x11/glx/X11GLXContext.java
@@ -244,7 +244,11 @@ public abstract class X11GLXContext extends GLContextImpl {
glXQueryExtensionsStringInitialized = true;
}
if (glXQueryExtensionsStringAvailable) {
- getGLDrawable().getFactory().lockToolkit();
+ GLDrawableFactory factory = getGLDrawable().getFactory();
+ boolean wasLocked = factory.isToolkitLocked();
+ if(!wasLocked) {
+ getGLDrawable().getFactory().lockToolkit();
+ }
try {
String ret = GLX.glXQueryExtensionsString(drawable.getNativeWindow().getDisplayHandle(),
drawable.getNativeWindow().getScreenIndex());
@@ -253,7 +257,9 @@ public abstract class X11GLXContext extends GLContextImpl {
}
return ret;
} finally {
- getGLDrawable().getFactory().unlockToolkit();
+ if(!wasLocked) {
+ getGLDrawable().getFactory().unlockToolkit();
+ }
}
} else {
return "";