summaryrefslogtreecommitdiffstats
path: root/src/test/com/jogamp
diff options
context:
space:
mode:
authorSven Gothel <[email protected]>2011-08-30 18:13:34 +0200
committerSven Gothel <[email protected]>2011-08-30 18:13:34 +0200
commit6b951024dcb3ba85e2d1dd042f1a8c60054277f5 (patch)
tree40fa77c3ebfeac1fa1c7f8abe0abda1ee3a40cf0 /src/test/com/jogamp
parentbcea6b67bafaaabf2b1c43989fb13c0e4bf82c98 (diff)
SWT/AWT Test: Run AWT destruction on AWT-EDT, issue shell.close() before shell.dispose()
This fixes the _XSend X11 error on GLX commands using AMD driver .. proper cause unknown, but probably a race or condition or threading issue (Display usage by diff threads).
Diffstat (limited to 'src/test/com/jogamp')
-rw-r--r--src/test/com/jogamp/opengl/test/junit/jogl/swt/TestSWTAWT01GLn.java12
1 files changed, 8 insertions, 4 deletions
diff --git a/src/test/com/jogamp/opengl/test/junit/jogl/swt/TestSWTAWT01GLn.java b/src/test/com/jogamp/opengl/test/junit/jogl/swt/TestSWTAWT01GLn.java
index db95f9660..2b12cdd23 100644
--- a/src/test/com/jogamp/opengl/test/junit/jogl/swt/TestSWTAWT01GLn.java
+++ b/src/test/com/jogamp/opengl/test/junit/jogl/swt/TestSWTAWT01GLn.java
@@ -58,7 +58,7 @@ import com.jogamp.opengl.test.junit.util.UITestCase;
/**
* Tests that a basic SWT app can open without crashing under different GL profiles. Uses the AWT GL canvas with
* the SWT_AWT bridge.
- * @author Wade Walker
+ * @author Wade Walker, et.al.
*/
public class TestSWTAWT01GLn extends UITestCase {
@@ -97,10 +97,14 @@ public class TestSWTAWT01GLn extends UITestCase {
Assert.assertNotNull( composite );
Assert.assertNotNull( glcanvas );
try {
- frame.setVisible( false );
- frame.remove( glcanvas );
- frame.dispose();
+ javax.swing.SwingUtilities.invokeAndWait(new Runnable() {
+ public void run() {
+ frame.setVisible(false);
+ frame.remove(glcanvas);
+ frame.dispose();
+ }});
composite.dispose();
+ shell.close();
shell.dispose();
display.dispose();
}