diff options
author | Sven Gothel <[email protected]> | 2012-07-20 22:16:54 +0200 |
---|---|---|
committer | Sven Gothel <[email protected]> | 2012-07-20 22:16:54 +0200 |
commit | adc9522ccaff74eb779d4d33905d76d52acb36bb (patch) | |
tree | 183088e6256cc414461044a1db7a9ce2b5a7ab9e /src/test/com/jogamp | |
parent | e58e7739379147af8c7b875f6e8a7cdb40e342bc (diff) |
Fix TestSWTAccessor02GLn regression .. forgot to: canvas.addControlListener(swtUpstreamHook);
Diffstat (limited to 'src/test/com/jogamp')
-rw-r--r-- | src/test/com/jogamp/opengl/test/junit/jogl/swt/TestSWTAccessor02GLn.java | 10 |
1 files changed, 7 insertions, 3 deletions
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() ) { |