summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-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() ) {