diff options
author | Sven Gothel <[email protected]> | 2013-11-18 01:11:15 +0100 |
---|---|---|
committer | Sven Gothel <[email protected]> | 2013-11-18 01:11:15 +0100 |
commit | 23697c7921039e9655a5760e21d7029598b679d7 (patch) | |
tree | 922e715e8b3d3648f2929786321193c3fd06cda1 /src/test/com/jogamp/opengl | |
parent | d04ca826bc3ca95eb32921e59c1845a1626f88e6 (diff) |
Fix Bug 879 Regression (2/2) - NewtCanvasAWT.FocusAction must take focus when in offscreen-mode (OSX/CALayer)
NewtCanvasAWT.FocusAction must take focus when in offscreen-mode (OSX/CALayer)
since the NEWT window _is_ offscreen (no input events) and AWT events are translated to NEWT.
Regression of commit 0be87f241c0f0b2f5881d9a602ce12378b8e453d
Diffstat (limited to 'src/test/com/jogamp/opengl')
-rw-r--r-- | src/test/com/jogamp/opengl/test/junit/newt/parenting/TestParentingFocus03KeyTraversalAWT.java | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/src/test/com/jogamp/opengl/test/junit/newt/parenting/TestParentingFocus03KeyTraversalAWT.java b/src/test/com/jogamp/opengl/test/junit/newt/parenting/TestParentingFocus03KeyTraversalAWT.java index 1e6cf4a1d..e928b2a34 100644 --- a/src/test/com/jogamp/opengl/test/junit/newt/parenting/TestParentingFocus03KeyTraversalAWT.java +++ b/src/test/com/jogamp/opengl/test/junit/newt/parenting/TestParentingFocus03KeyTraversalAWT.java @@ -283,7 +283,15 @@ public class TestParentingFocus03KeyTraversalAWT extends UITestCase { System.err.println("Test: Direct NEWT-Child request focus"); glWindow1.requestFocus(); - Assert.assertTrue("Did not gain focus", AWTRobotUtil.waitForFocus(glWindow1, glWindow1FA, bWestFA)); + { + // Short: Assert.assertTrue("Did not gain focus", AWTRobotUtil.waitForFocus(glWindow1, glWindow1FA, bWestFA)); + // More verbose: + final boolean ok = AWTRobotUtil.waitForFocus(glWindow1, glWindow1FA, bWestFA); + System.err.println("glWindow hasFocus "+glWindow1.hasFocus()); + System.err.println("glWindow1FA "+glWindow1FA); + System.err.println("bWestFA "+bWestFA); + Assert.assertTrue("Did not gain focus", ok); + } Assert.assertEquals(true, glWindow1FA.focusGained()); Assert.assertEquals(true, bWestFA.focusLost()); Thread.sleep(durationPerTest/numFocus); |