aboutsummaryrefslogtreecommitdiffstats
path: root/src/test/com/jogamp/opengl
diff options
context:
space:
mode:
Diffstat (limited to 'src/test/com/jogamp/opengl')
-rw-r--r--src/test/com/jogamp/opengl/test/junit/jogl/acore/TestSharedContextListAWT.java15
-rw-r--r--src/test/com/jogamp/opengl/test/junit/util/AWTRobotUtil.java6
2 files changed, 11 insertions, 10 deletions
diff --git a/src/test/com/jogamp/opengl/test/junit/jogl/acore/TestSharedContextListAWT.java b/src/test/com/jogamp/opengl/test/junit/jogl/acore/TestSharedContextListAWT.java
index 63f54e267..bf4c493bc 100644
--- a/src/test/com/jogamp/opengl/test/junit/jogl/acore/TestSharedContextListAWT.java
+++ b/src/test/com/jogamp/opengl/test/junit/jogl/acore/TestSharedContextListAWT.java
@@ -85,8 +85,12 @@ public class TestSharedContextListAWT extends UITestCase {
protected GLCanvas runTestGL(final Frame frame, final Animator animator, final int x, final int y, final boolean useShared)
throws InterruptedException
{
- final GLCanvas glCanvas = new GLCanvas(caps, useShared ? sharedDrawable.getContext() : null);
+ final GLCanvas glCanvas = new GLCanvas(caps, useShared ? sharedDrawable.getContext() : null);
Assert.assertNotNull(glCanvas);
+ frame.add(glCanvas);
+ frame.setLocation(x, y);
+ frame.setSize(width, height);
+
Gears gears = new Gears();
if(useShared) {
gears.setGears(sharedGears.getGear1(), sharedGears.getGear2(), sharedGears.getGear3());
@@ -95,14 +99,7 @@ public class TestSharedContextListAWT extends UITestCase {
animator.add(glCanvas);
- SwingUtilities.invokeLater(new Runnable() {
- public void run() {
- frame.add(glCanvas);
- frame.setLocation(x, y);
- frame.setSize(width, height);
- frame.pack();
- frame.setVisible(true);
- } });
+ frame.setVisible(true);
Assert.assertEquals(true, AWTRobotUtil.waitForRealized(glCanvas, true));
return glCanvas;
diff --git a/src/test/com/jogamp/opengl/test/junit/util/AWTRobotUtil.java b/src/test/com/jogamp/opengl/test/junit/util/AWTRobotUtil.java
index bbd53db9b..d0f9172bc 100644
--- a/src/test/com/jogamp/opengl/test/junit/util/AWTRobotUtil.java
+++ b/src/test/com/jogamp/opengl/test/junit/util/AWTRobotUtil.java
@@ -367,11 +367,15 @@ public class AWTRobotUtil {
}
if(wait>=POLL_DIVIDER) {
// for some reason GLCanvas hasn't been painted yet, force it!
- System.err.println("XXX: FORCE REPAINT - canvas: "+glcanvas);
+ System.err.println("XXX: FORCE REPAINT PRE - canvas: "+glcanvas);
glcanvas.repaint();
for (wait=0; wait<POLL_DIVIDER && realized != glcanvas.isRealized(); wait++) {
Thread.sleep(TIME_OUT/POLL_DIVIDER);
}
+ System.err.println("XXX: FORCE REPAINT POST - canvas: "+glcanvas);
+ }
+ for (wait=0; wait<POLL_DIVIDER && realized != glcanvas.isRealized(); wait++) {
+ Thread.sleep(TIME_OUT/POLL_DIVIDER);
}
}
} else if(obj instanceof com.jogamp.newt.Window) {