diff options
Diffstat (limited to 'src/classes/com/sun/opengl/impl/x11/glx/X11GLXDrawable.java')
-rw-r--r-- | src/classes/com/sun/opengl/impl/x11/glx/X11GLXDrawable.java | 10 |
1 files changed, 2 insertions, 8 deletions
diff --git a/src/classes/com/sun/opengl/impl/x11/glx/X11GLXDrawable.java b/src/classes/com/sun/opengl/impl/x11/glx/X11GLXDrawable.java index cf34d9492..96e2d897f 100644 --- a/src/classes/com/sun/opengl/impl/x11/glx/X11GLXDrawable.java +++ b/src/classes/com/sun/opengl/impl/x11/glx/X11GLXDrawable.java @@ -105,11 +105,7 @@ public abstract class X11GLXDrawable extends GLDrawableImpl { template.screen(screen); XVisualInfo[] infos = null; GLCapabilities[] caps = null; - boolean didLock = false; - if (!getFactoryImpl().isToolkitLocked()) { - getFactoryImpl().lockToolkit(); - didLock = true; - } + getFactoryImpl().lockToolkit(); try { infos = X11Lib.XGetVisualInfo(display, X11Lib.VisualScreenMask, template, count, 0); if (infos == null) { @@ -120,9 +116,7 @@ public abstract class X11GLXDrawable extends GLDrawableImpl { caps[i] = ((X11GLXDrawableFactory)getFactory()).xvi2GLCapabilities(display, infos[i]); } } finally { - if (didLock) { - getFactoryImpl().unlockToolkit(); - } + getFactoryImpl().unlockToolkit(); } GLCapabilities capabilities = getRequestedGLCapabilities(); int chosen = chooser.chooseCapabilities(capabilities, caps, -1); |