From d335d99df25cc929d06765c3f1af3944f124f6a7 Mon Sep 17 00:00:00 2001 From: Sven Gothel Date: Mon, 15 Jun 2020 01:21:44 +0200 Subject: [PATCH 1/2] Fix 'typo' in branching, valid config index is >= 0 (not < 0) This issue was introduced in commit 0a6a592c04a85d8124aa9d38b67f0caa1d739b75 and the '2nd choice branch' obviously never tested. Thanks to Lathanda finding this issue on 6/14/20. --- .../wgl/awt/WindowsAWTWGLGraphicsConfigurationFactory.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/jogl/classes/jogamp/opengl/windows/wgl/awt/WindowsAWTWGLGraphicsConfigurationFactory.java b/src/jogl/classes/jogamp/opengl/windows/wgl/awt/WindowsAWTWGLGraphicsConfigurationFactory.java index 342b4a750..3e5ce4fc0 100644 --- a/src/jogl/classes/jogamp/opengl/windows/wgl/awt/WindowsAWTWGLGraphicsConfigurationFactory.java +++ b/src/jogl/classes/jogamp/opengl/windows/wgl/awt/WindowsAWTWGLGraphicsConfigurationFactory.java @@ -167,7 +167,7 @@ protected AbstractGraphicsConfiguration chooseGraphicsConfigurationImpl( } winConfig.preselectGraphicsConfiguration(drawableFactory, pfdIDs); final int gcIdx = pfdIDOSet.indexOf(Integer.valueOf(winConfig.getPixelFormatID())); - if( 0 > gcIdx ) { + if( 0 <= gcIdx ) { chosenGC = configs[gcIdx]; if(DEBUG) { System.err.println("WindowsAWTWGLGraphicsConfigurationFactory: Found matching AWT PFD ID "+winConfig.getPixelFormatID()+" -> "+winConfig); From ecf6e499d3b582d651a28693c871ca14d6e8c991 Mon Sep 17 00:00:00 2001 From: Sven Gothel Date: Mon, 15 Jun 2020 01:50:05 +0200 Subject: [PATCH 2/2] Fix TestBug1398Deadlock02AWT: Missed adaption of unit test to AWTRobotUtil & GLTestUtil changes when 'front porting' Thanks to Julien Gouesse reminding me of this issue. --- .../test/junit/jogl/acore/TestBug1398Deadlock02AWT.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/test/com/jogamp/opengl/test/junit/jogl/acore/TestBug1398Deadlock02AWT.java b/src/test/com/jogamp/opengl/test/junit/jogl/acore/TestBug1398Deadlock02AWT.java index f5bf105bf..36160997a 100644 --- a/src/test/com/jogamp/opengl/test/junit/jogl/acore/TestBug1398Deadlock02AWT.java +++ b/src/test/com/jogamp/opengl/test/junit/jogl/acore/TestBug1398Deadlock02AWT.java @@ -33,6 +33,7 @@ import com.jogamp.opengl.awt.GLCanvas; import com.jogamp.opengl.util.Animator; import com.jogamp.opengl.test.junit.util.AWTRobotUtil; +import com.jogamp.opengl.test.junit.util.GLTestUtil; import com.jogamp.opengl.test.junit.util.UITestCase; import com.jogamp.opengl.test.junit.jogl.demos.es2.GearsES2; @@ -98,8 +99,8 @@ public void run() { Assume.assumeNoException(t); } animator.start(); - Assert.assertEquals(true, AWTRobotUtil.waitForRealized(glCanvas, true)); - Assert.assertEquals(true, AWTRobotUtil.waitForContextCreated(glCanvas, true)); + Assert.assertEquals(true, AWTRobotUtil.waitForRealized(glCanvas, true, null)); + Assert.assertEquals(true, GLTestUtil.waitForContextCreated(glCanvas, true, null)); Thread.sleep(1000); // 1s