From adc9522ccaff74eb779d4d33905d76d52acb36bb Mon Sep 17 00:00:00 2001 From: Sven Gothel Date: Fri, 20 Jul 2012 22:16:54 +0200 Subject: Fix TestSWTAccessor02GLn regression .. forgot to: canvas.addControlListener(swtUpstreamHook); --- .../opengl/test/junit/jogl/swt/TestSWTAccessor02GLn.java | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) (limited to 'src/test') 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() ) { -- cgit v1.2.3