diff options
Diffstat (limited to 'src/newt/classes/jogamp')
-rw-r--r-- | src/newt/classes/jogamp/newt/awt/NewtFactoryAWT.java | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/src/newt/classes/jogamp/newt/awt/NewtFactoryAWT.java b/src/newt/classes/jogamp/newt/awt/NewtFactoryAWT.java index ea4960053..2ca3d2cfd 100644 --- a/src/newt/classes/jogamp/newt/awt/NewtFactoryAWT.java +++ b/src/newt/classes/jogamp/newt/awt/NewtFactoryAWT.java @@ -28,6 +28,7 @@ package jogamp.newt.awt; +import javax.media.nativewindow.AbstractGraphicsConfiguration; import javax.media.nativewindow.CapabilitiesImmutable; import javax.media.nativewindow.NativeWindow; import javax.media.nativewindow.NativeWindowException; @@ -74,6 +75,13 @@ public class NewtFactoryAWT extends NewtFactory { System.err.println("NewtFactoryAWT.getNativeWindow: "+awtComp+" -> "+nw); } return (JAWTWindow)nw; - } + } + + public static void destroyNativeWindow(JAWTWindow jawtWindow) { + final AbstractGraphicsConfiguration config = jawtWindow.getGraphicsConfiguration(); + jawtWindow.destroy(); + config.getScreen().getDevice().close(); + } + } |