From 481285c3d19d0a4c019cffc72b7a8b58296b748e Mon Sep 17 00:00:00 2001 From: Sven Gothel Date: Mon, 28 Feb 2011 23:54:33 +0100 Subject: fix test - dont use GLAutoDrawable.invoke(boolean wait, GLRunnable glRunnable) for window locking calls, ie window changes. The GLRunnable list is executed while window is locked. --- .../junit/jogl/demos/gl2/gears/newt/TestGearsNEWT.java | 18 ++++++++---------- 1 file changed, 8 insertions(+), 10 deletions(-) diff --git a/src/test/com/jogamp/opengl/test/junit/jogl/demos/gl2/gears/newt/TestGearsNEWT.java b/src/test/com/jogamp/opengl/test/junit/jogl/demos/gl2/gears/newt/TestGearsNEWT.java index 5433a5ba2..0f7d77f82 100644 --- a/src/test/com/jogamp/opengl/test/junit/jogl/demos/gl2/gears/newt/TestGearsNEWT.java +++ b/src/test/com/jogamp/opengl/test/junit/jogl/demos/gl2/gears/newt/TestGearsNEWT.java @@ -83,17 +83,15 @@ public class TestGearsNEWT extends UITestCase { glWindow.addKeyListener(new KeyAdapter() { public void keyTyped(KeyEvent e) { if(e.getKeyChar()=='f') { - f_glWindow.invoke(false, new GLRunnable() { - public void run(GLAutoDrawable drawable) { - GLWindow win = (GLWindow)drawable; - win.setFullscreen(!win.isFullscreen()); - } }); + new Thread() { + public void run() { + f_glWindow.setFullscreen(!f_glWindow.isFullscreen()); + } }.start(); } else if(e.getKeyChar()=='d') { - f_glWindow.invoke(false, new GLRunnable() { - public void run(GLAutoDrawable drawable) { - GLWindow win = (GLWindow)drawable; - win.setUndecorated(!win.isUndecorated()); - } }); + new Thread() { + public void run() { + f_glWindow.setUndecorated(!f_glWindow.isUndecorated()); + } }.start(); } } }); -- cgit v1.2.3