aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSven Gothel <[email protected]>2012-07-20 22:16:54 +0200
committerSven Gothel <[email protected]>2012-07-20 22:16:54 +0200
commitadc9522ccaff74eb779d4d33905d76d52acb36bb (patch)
tree183088e6256cc414461044a1db7a9ce2b5a7ab9e
parente58e7739379147af8c7b875f6e8a7cdb40e342bc (diff)
Fix TestSWTAccessor02GLn regression .. forgot to: canvas.addControlListener(swtUpstreamHook);
-rwxr-xr-xmake/scripts/tests.sh4
-rw-r--r--src/test/com/jogamp/opengl/test/junit/jogl/swt/TestSWTAccessor02GLn.java10
2 files changed, 9 insertions, 5 deletions
diff --git a/make/scripts/tests.sh b/make/scripts/tests.sh
index 19297ae25..13e172770 100755
--- a/make/scripts/tests.sh
+++ b/make/scripts/tests.sh
@@ -402,14 +402,14 @@ function testawtswt() {
#testawt com.jogamp.opengl.test.junit.newt.TestFocus02SwingAWTRobot $*
#linux:
-#testswt com.jogamp.opengl.test.junit.jogl.swt.TestSWTAccessor02GLn $* # ??
+testswt com.jogamp.opengl.test.junit.jogl.swt.TestSWTAccessor02GLn $* # ??
# osx:
#testawt com.jogamp.opengl.test.junit.newt.parenting.TestParentingFocusTraversal01AWT $*
#testawt com.jogamp.opengl.test.junit.newt.parenting.TestParentingOffscreenLayer01GLCanvasAWT $*
#testawt com.jogamp.opengl.test.junit.newt.parenting.TestParentingOffscreenLayer01GLCanvasAWT $*
-testawt com.jogamp.opengl.test.junit.newt.parenting.TestParentingOffscreenLayer02NewtCanvasAWT $*
+#testawt com.jogamp.opengl.test.junit.newt.parenting.TestParentingOffscreenLayer02NewtCanvasAWT $*
$spath/count-edt-start.sh java-run.log
diff --git a/src/test/com/jogamp/opengl/test/junit/jogl/swt/TestSWTAccessor02GLn.java b/src/test/com/jogamp/opengl/test/junit/jogl/swt/TestSWTAccessor02GLn.java
index 6100ff377..c7053885e 100644
--- a/src/test/com/jogamp/opengl/test/junit/jogl/swt/TestSWTAccessor02GLn.java
+++ b/src/test/com/jogamp/opengl/test/junit/jogl/swt/TestSWTAccessor02GLn.java
@@ -140,23 +140,27 @@ public class TestSWTAccessor02GLn extends UITestCase {
SWTAccessor.invoke(true, canvasCstr);
final Canvas canvas = canvasCstr.canvas;
- Assert.assertNotNull( canvas );
-
+ Assert.assertNotNull( canvas );
SWTAccessor.setRealized(canvas, true);
+
AbstractGraphicsDevice device = SWTAccessor.getDevice(canvas);
long nativeWindowHandle = SWTAccessor.getWindowHandle(canvas);
System.err.println("*** device: " + device);
System.err.println("*** window handle: 0x" + Long.toHexString(nativeWindowHandle));
final SWTUpstreamHook swtUpstreamHook = new SWTUpstreamHook(canvas);
+ canvas.addControlListener(swtUpstreamHook);
+
final ProxySurface proxySurface = factory.createProxySurface(device, 0, nativeWindowHandle, caps, null, swtUpstreamHook);
- Assert.assertNotNull( proxySurface );
+ Assert.assertNotNull( proxySurface );
System.err.println("*** ProxySurface: " + proxySurface);
+
final GLDrawable drawable = factory.createGLDrawable(proxySurface);
Assert.assertNotNull( drawable );
drawable.setRealized(true);
System.err.println("*** Drawable: " + drawable);
Assert.assertTrue( drawable.isRealized() );
+
final GLContext glcontext = drawable.createContext(null);
// trigger native creation ..
if( GLContext.CONTEXT_NOT_CURRENT < glcontext.makeCurrent() ) {