--- ../../Applications/JOGLGIT/jogl/src/jogl/classes/javax/media/opengl/awt/GLCanvas.java (date 1324262636000) +++ ../../Applications/JOGLGIT/jogl/src/jogl/classes/javax/media/opengl/awt/GLCanvas.java (revision ) @@ -880,18 +880,25 @@ class DisposeAbstractGraphicsDeviceAction implements Runnable { public void run() { if(null != awtConfig) { - final AbstractGraphicsDevice adevice = awtConfig.getScreen().getDevice(); + final AbstractGraphicsDevice adevice = awtConfig.getScreen().getDevice(); + final AbstractGraphicsDevice aNativeDevice = awtConfig.getNativeGraphicsConfiguration().getScreen().getDevice(); - final String adeviceMsg; + final String adeviceMsg; + final String aNativeDeviceMSG; - if(DEBUG) { - adeviceMsg = adevice.toString(); + if(DEBUG) { + adeviceMsg = adevice.toString(); + aNativeDeviceMSG = aNativeDevice.toString(); - } else { - adeviceMsg = null; + } else { + adeviceMsg = null; + aNativeDeviceMSG = null; - } - boolean closed = awtConfig.getScreen().getDevice().close(); + } + boolean closed = awtConfig.getScreen().getDevice().close(); + //Also close native graphics configuration, which seems to be important for X11 + boolean nativeClosed = awtConfig.getNativeGraphicsConfiguration().getScreen().getDevice().close(); - if(DEBUG) { - System.err.println(Thread.currentThread().getName() + " - GLCanvas.dispose(false): closed GraphicsDevice: "+adeviceMsg+", result: "+closed); + if(DEBUG) { + System.err.println(Thread.currentThread().getName() + " - GLCanvas.dispose(false): closed GraphicsDevice: "+adeviceMsg+", result: "+closed); + System.err.println(Thread.currentThread().getName() + " - GLCanvas.dispose(false): closed GraphicsDevice: "+aNativeDeviceMSG+", result: "+nativeClosed); - } - awtConfig=null; + } + awtConfig=null; } } }