diff options
Diffstat (limited to 'src/jogl/classes/com')
-rw-r--r-- | src/jogl/classes/com/jogamp/opengl/impl/x11/glx/X11GLXDrawableFactory.java | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/jogl/classes/com/jogamp/opengl/impl/x11/glx/X11GLXDrawableFactory.java b/src/jogl/classes/com/jogamp/opengl/impl/x11/glx/X11GLXDrawableFactory.java index 38294bf4f..186bd5ec5 100644 --- a/src/jogl/classes/com/jogamp/opengl/impl/x11/glx/X11GLXDrawableFactory.java +++ b/src/jogl/classes/com/jogamp/opengl/impl/x11/glx/X11GLXDrawableFactory.java @@ -181,15 +181,16 @@ public class X11GLXDrawableFactory extends GLDrawableFactoryImpl { throw new GLException("Couldn't create shared context for drawable: "+sharedDrawable); } sharedContext.setSynchronized(true); - sharedContext.makeCurrent(); VersionNumber glXVersion; - { + sharedContext.makeCurrent(); + try { int[] major = new int[1]; int[] minor = new int[1]; GLXUtil.getGLXVersion(sharedDevice.getHandle(), major, minor); glXVersion = new VersionNumber(major[0], minor[0], 0); + } finally { + sharedContext.release(); } - sharedContext.release(); if (DEBUG) { System.err.println("!!! SharedDevice: " + sharedDevice); System.err.println("!!! SharedScreen: " + sharedScreen); |