diff options
author | Sven Gothel <sgothel@jausoft.com> | 2013-04-16 06:19:08 +0200 |
---|---|---|
committer | Sven Gothel <sgothel@jausoft.com> | 2013-04-16 06:19:08 +0200 |
commit | 94d3960757db292eeefb7acdfa1220b6b7168b98 (patch) | |
tree | 52bae62205bc6196718522e3f18b9b1a63bd4d48 /src/jogl/classes/jogamp/opengl | |
parent | cea002636c4c8e1cf41288662fffc26bd24f90ac (diff) |
Fix Bug 705 - Set Quirk DontCloseX11Display also if using X11 and X11Util has set 'markAllDisplaysUnclosable' (Down -> Upstream)
Diffstat (limited to 'src/jogl/classes/jogamp/opengl')
-rw-r--r-- | src/jogl/classes/jogamp/opengl/GLContextImpl.java | 40 |
1 files changed, 26 insertions, 14 deletions
diff --git a/src/jogl/classes/jogamp/opengl/GLContextImpl.java b/src/jogl/classes/jogamp/opengl/GLContextImpl.java index 3657cacda..7b760ed0e 100644 --- a/src/jogl/classes/jogamp/opengl/GLContextImpl.java +++ b/src/jogl/classes/jogamp/opengl/GLContextImpl.java @@ -61,6 +61,7 @@ import com.jogamp.opengl.GLRendererQuirks; import javax.media.nativewindow.AbstractGraphicsConfiguration; import javax.media.nativewindow.AbstractGraphicsDevice; import javax.media.nativewindow.NativeSurface; +import javax.media.nativewindow.NativeWindowFactory; import javax.media.opengl.GL; import javax.media.opengl.GL2ES2; import javax.media.opengl.GL2GL3; @@ -1567,22 +1568,33 @@ public abstract class GLContextImpl extends GLContext { quirks[i++] = quirk; } } - if( glRendererLowerCase.contains("mesa") ) { - if ( glRendererLowerCase.contains("x11") && vendorVersion.compareTo(Version80) < 0 ) { - final int quirk = GLRendererQuirks.DontCloseX11Display; - if(DEBUG) { - System.err.println("Quirk: "+GLRendererQuirks.toString(quirk)+": cause: Renderer=" + glRenderer + ", Version=[vendor " + vendorVersion + ", GL " + glVersion+"]"); + + // + // Quirk: DontCloseX11Display + // + { + final int quirk = GLRendererQuirks.DontCloseX11Display; + if( glRendererLowerCase.contains("mesa") ) { + if ( glRendererLowerCase.contains("x11") && vendorVersion.compareTo(Version80) < 0 ) { + if(DEBUG) { + System.err.println("Quirk: "+GLRendererQuirks.toString(quirk)+": cause: Renderer=" + glRenderer + ", Version=[vendor " + vendorVersion + ", GL " + glVersion+"]"); + } + quirks[i++] = quirk; + } + } else if( glRendererLowerCase.contains("ati technologies") || glRendererLowerCase.startsWith("ati ") ) { + { + if(DEBUG) { + System.err.println("Quirk: "+GLRendererQuirks.toString(quirk)+": cause: Renderer=" + glRenderer); + } + quirks[i++] = quirk; } - quirks[i++] = quirk; - } - } - if( glRendererLowerCase.contains("ati technologies") || glRendererLowerCase.startsWith("ati ") ) { - { - final int quirk = GLRendererQuirks.DontCloseX11Display; - if(DEBUG) { - System.err.println("Quirk: "+GLRendererQuirks.toString(quirk)+": cause: Renderer=" + glRenderer); + } else if( NativeWindowFactory.TYPE_X11 == NativeWindowFactory.getNativeWindowType(true) ) { + if( jogamp.nativewindow.x11.X11Util.getMarkAllDisplaysUnclosable() ) { + if(DEBUG) { + System.err.println("Quirk: "+GLRendererQuirks.toString(quirk)+": cause: X11Util Downstream"); + } + quirks[i++] = quirk; } - quirks[i++] = quirk; } } |