diff options
Diffstat (limited to 'src/newt/classes')
-rw-r--r-- | src/newt/classes/jogamp/newt/WindowImpl.java | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/newt/classes/jogamp/newt/WindowImpl.java b/src/newt/classes/jogamp/newt/WindowImpl.java index d033a8794..cb43fae32 100644 --- a/src/newt/classes/jogamp/newt/WindowImpl.java +++ b/src/newt/classes/jogamp/newt/WindowImpl.java @@ -879,7 +879,10 @@ public abstract class WindowImpl implements Window, NEWTEventConsumer if( isNativeValid() ) { screen.removeScreenModeListener(screenModeListenerImpl); closeNativeImpl(); - config.getScreen().getDevice().close(); + final AbstractGraphicsDevice cfgADevice = config.getScreen().getDevice(); + if( cfgADevice != screen.getDisplay().getGraphicsDevice() ) { // don't pull display's device + cfgADevice.close(); // ensure a cfg's device is closed + } setGraphicsConfiguration(null); removeScreenReference(); } |