aboutsummaryrefslogtreecommitdiffstats
path: root/src/classes/com
diff options
context:
space:
mode:
authorSven Gothel <[email protected]>2008-11-07 01:57:49 +0000
committerSven Gothel <[email protected]>2008-11-07 01:57:49 +0000
commit9802bc053ef45140690bb58232429d225dfe0f75 (patch)
tree94eba90702d14ce1e2a2005c286bc6d142422fe9 /src/classes/com
parent247c010c035348260bdcf36aa0435808e0af52c8 (diff)
X11 getPlatformExtensionsString shall use the toolkit looking
optional, since it could be called from a locked state, e.g. setSwapInterval. Done. git-svn-id: file:///usr/local/projects/SUN/JOGL/git-svn/svn-server-sync/jogl/branches/JOGL_2_SANDBOX@1783 232f8b59-042b-4e1e-8c03-345bb8c30851
Diffstat (limited to 'src/classes/com')
-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 "";