From 249351d96e22999db2ac83ad60eaa5c5c6120bd7 Mon Sep 17 00:00:00 2001 From: Sven Gothel Date: Thu, 19 Jan 2012 01:20:07 +0100 Subject: UI Test AWTRobotUtil's toFront*(): retry requestFocus() within loop. --- .../opengl/test/junit/util/AWTRobotUtil.java | 25 ++++++++++++---------- 1 file changed, 14 insertions(+), 11 deletions(-) (limited to 'src/test/com/jogamp/opengl') 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 b626ed282..35a2d9669 100644 --- a/src/test/com/jogamp/opengl/test/junit/util/AWTRobotUtil.java +++ b/src/test/com/jogamp/opengl/test/junit/util/AWTRobotUtil.java @@ -130,19 +130,22 @@ public class AWTRobotUtil { robot.mouseMove( (int) p0.getX(), (int) p0.getY() ); robot.delay(ROBOT_DELAY); - javax.swing.SwingUtilities.invokeAndWait(new Runnable() { - public void run() { - window.setVisible(true); - window.toFront(); - window.requestFocus(); - }}); - robot.delay(ROBOT_DELAY); - - int wait; - for (wait=0; wait