summaryrefslogtreecommitdiffstats
path: root/src/demos/es1/RedSquare.java
diff options
context:
space:
mode:
authorSven Gothel <[email protected]>2009-10-12 02:11:15 -0700
committerSven Gothel <[email protected]>2009-10-12 02:11:15 -0700
commit93a269bccf608baa5e7f8b7ec13ba823b8b2f086 (patch)
treece7506646e3100b94a8380528ca42da1ec0c3350 /src/demos/es1/RedSquare.java
parentd1a53b3ba93789aea1c37d042bc722a2a9c052d9 (diff)
JOGLNewtAppletBase et al - no dispose event at destruction, since it's critical within a browser
Diffstat (limited to 'src/demos/es1/RedSquare.java')
-rwxr-xr-xsrc/demos/es1/RedSquare.java8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/demos/es1/RedSquare.java b/src/demos/es1/RedSquare.java
index 026e1c2..5f573f8 100755
--- a/src/demos/es1/RedSquare.java
+++ b/src/demos/es1/RedSquare.java
@@ -17,6 +17,7 @@ public class RedSquare extends Thread implements WindowListener, KeyListener, Mo
public static boolean glDebugEmu = false;
public static boolean glDebug = false ;
public static boolean glTrace = false ;
+ public Window nWindow = null;
public GLWindow window;
private GLProfile glp;
private GLU glu;
@@ -110,7 +111,6 @@ public class RedSquare extends Thread implements WindowListener, KeyListener, Mo
try {
GLCapabilities caps = new GLCapabilities(glp);
- Window nWindow = null;
if(0!=(type&USE_AWT)) {
Display nDisplay = NewtFactory.createDisplay(NativeWindowFactory.TYPE_AWT, null); // local display
Screen nScreen = NewtFactory.createScreen(NativeWindowFactory.TYPE_AWT, nDisplay, 0); // screen 0
@@ -167,11 +167,15 @@ public class RedSquare extends Thread implements WindowListener, KeyListener, Mo
try {
System.out.println("SHUTDOWN "+Thread.currentThread()+" START");
// Shut things down cooperatively
- window.destroy(true);
+ window.destroy();
if(oneThread) {
window.getFactory().shutdown();
}
window = null;
+ if(null!=nWindow) {
+ nWindow.destroy();
+ nWindow=null;
+ }
System.out.println("SHUTDOWN "+Thread.currentThread()+" FIN");
} catch (Throwable t) {
t.printStackTrace();