View | Details | Raw Unified | Return to bug 565
Collapse All | Expand All

(-)../../Applications/JOGLGIT/jogl/src/jogl/classes/javax/media/opengl/awt/GLCanvas.java (-12 / +19 lines)
Lines 880-897 Link Here
880
  class DisposeAbstractGraphicsDeviceAction implements Runnable {
880
  class DisposeAbstractGraphicsDeviceAction implements Runnable {
881
    public void run() {
881
    public void run() {
882
      if(null != awtConfig) {
882
      if(null != awtConfig) {
883
          final AbstractGraphicsDevice adevice = awtConfig.getScreen().getDevice();
883
        final AbstractGraphicsDevice adevice = awtConfig.getScreen().getDevice();
884
        final AbstractGraphicsDevice aNativeDevice = awtConfig.getNativeGraphicsConfiguration().getScreen().getDevice();
884
          final String adeviceMsg;
885
        final String adeviceMsg;
886
        final String aNativeDeviceMSG;
885
          if(DEBUG) {
887
        if(DEBUG) {
886
            adeviceMsg = adevice.toString();
888
          adeviceMsg = adevice.toString();
889
          aNativeDeviceMSG = aNativeDevice.toString();
887
          } else {
890
        } else {
888
            adeviceMsg = null;  
891
          adeviceMsg = null;
892
          aNativeDeviceMSG = null;
889
          }
893
        }
890
          boolean closed = awtConfig.getScreen().getDevice().close();
894
        boolean closed = awtConfig.getScreen().getDevice().close();
895
        //Also close native graphics configuration, which seems to be important for X11
896
        boolean nativeClosed = awtConfig.getNativeGraphicsConfiguration().getScreen().getDevice().close();
891
          if(DEBUG) {
897
        if(DEBUG) {
892
            System.err.println(Thread.currentThread().getName() + " - GLCanvas.dispose(false): closed GraphicsDevice: "+adeviceMsg+", result: "+closed);
898
          System.err.println(Thread.currentThread().getName() + " - GLCanvas.dispose(false): closed GraphicsDevice: "+adeviceMsg+", result: "+closed);
899
          System.err.println(Thread.currentThread().getName() + " - GLCanvas.dispose(false): closed GraphicsDevice: "+aNativeDeviceMSG+", result: "+nativeClosed);
893
          }
900
        }
894
          awtConfig=null;
901
        awtConfig=null;
895
      }
902
      }
896
    }
903
    }
897
  }
904
  }

Return to bug 565