From ff25c711fe4fa627004c57e0d308d06759156290 Mon Sep 17 00:00:00 2001 From: Sven Gothel Date: Tue, 16 Apr 2013 05:50:55 +0200 Subject: Fix Bug 705 - Cleanup & Generalize Commit 5b47372590ec715647ebbd75d70c41ec7a64485a ; Close X11 Display in isDeviceSupported() - Moved GL vendor version parsing to GLVersionNumber - Moved X11Util.markAllDisplaysUnclosable() trigger into SharedResource creation of - X11GLXDrawableFactory - EGLDrawableFactory - GLProfile is back to pre 5b47372590ec715647ebbd75d70c41ec7a64485a, i.e. contains no quirk artifact (clean) - Close X11 Display in X11GLXDrawableFactory.isDeviceSupported() Regression of 9a4fcc7ea4ec61e4ceed791acced734ac04ea270 - TODO: Remove X11Util markAllDisplaysUnclosable detection code ? Notes to Martin: - Use TAB == 4 SPACES - No author names into source code, git commit log is enough. - No need to tag your edits, the diff is enough. --- src/jogl/classes/jogamp/opengl/x11/glx/X11GLXDrawableFactory.java | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'src/jogl/classes/jogamp/opengl/x11') diff --git a/src/jogl/classes/jogamp/opengl/x11/glx/X11GLXDrawableFactory.java b/src/jogl/classes/jogamp/opengl/x11/glx/X11GLXDrawableFactory.java index 2f3940baa..9486b5875 100644 --- a/src/jogl/classes/jogamp/opengl/x11/glx/X11GLXDrawableFactory.java +++ b/src/jogl/classes/jogamp/opengl/x11/glx/X11GLXDrawableFactory.java @@ -73,6 +73,7 @@ import jogamp.opengl.SharedResourceRunner; import com.jogamp.common.util.VersionNumber; import com.jogamp.nativewindow.x11.X11GraphicsDevice; import com.jogamp.nativewindow.x11.X11GraphicsScreen; +import com.jogamp.opengl.GLRendererQuirks; public class X11GLXDrawableFactory extends GLDrawableFactoryImpl { @@ -236,6 +237,7 @@ public class X11GLXDrawableFactory extends GLDrawableFactoryImpl { res = GLXUtil.isGLXAvailableOnServer(x11Device); } finally { x11Device.unlock(); + x11Device.close(); } if(DEBUG) { System.err.println("GLX "+(res ? "is" : "not")+" available on device/server: "+x11Device); @@ -276,6 +278,9 @@ public class X11GLXDrawableFactory extends GLDrawableFactoryImpl { } finally { sharedContext.release(); } + if( sharedContext.hasRendererQuirk( GLRendererQuirks.DontCloseX11Display ) ) { + X11Util.markAllDisplaysUnclosable(); + } if (DEBUG) { System.err.println("SharedDevice: " + sharedDevice); System.err.println("SharedScreen: " + sharedScreen); -- cgit v1.2.3