From 8790d4a25410c51e747f4cdd7954ef8abbb7a68b Mon Sep 17 00:00:00 2001 From: Sven Gothel Date: Mon, 5 Oct 2015 09:06:39 +0200 Subject: Bug 1223: Add '-traceMouse' commandline argument to check whether mouse events are still received after manual maximize --- .../opengl/test/junit/jogl/demos/es2/newt/TestGearsES2NEWT.java | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'src/test/com/jogamp/opengl') diff --git a/src/test/com/jogamp/opengl/test/junit/jogl/demos/es2/newt/TestGearsES2NEWT.java b/src/test/com/jogamp/opengl/test/junit/jogl/demos/es2/newt/TestGearsES2NEWT.java index c821111a4..cbc26066c 100644 --- a/src/test/com/jogamp/opengl/test/junit/jogl/demos/es2/newt/TestGearsES2NEWT.java +++ b/src/test/com/jogamp/opengl/test/junit/jogl/demos/es2/newt/TestGearsES2NEWT.java @@ -39,6 +39,7 @@ import com.jogamp.newt.Window; import com.jogamp.newt.event.WindowEvent; import com.jogamp.newt.event.KeyAdapter; import com.jogamp.newt.event.KeyEvent; +import com.jogamp.newt.event.TraceMouseAdapter; import com.jogamp.newt.event.WindowAdapter; import com.jogamp.newt.opengl.GLWindow; import com.jogamp.newt.opengl.util.NEWTDemoListener; @@ -104,6 +105,7 @@ public class TestGearsES2NEWT extends UITestCase { static boolean forceGL3 = false; static boolean forceGL2 = false; static int demoType = 1; + static boolean traceMouse = false; static boolean manualTest = false; static boolean exclusiveContext = false; static boolean useAnimator = true; @@ -203,6 +205,9 @@ public class TestGearsES2NEWT extends UITestCase { final NEWTDemoListener newtDemoListener = new NEWTDemoListener(glWindow); newtDemoListener.quitAdapterEnable(true); glWindow.addKeyListener(newtDemoListener); + if( traceMouse ) { + glWindow.addMouseListener(new TraceMouseAdapter()); + } glWindow.addMouseListener(newtDemoListener); glWindow.addWindowListener(newtDemoListener); glWindow.addKeyListener(new KeyAdapter() { @@ -516,6 +521,8 @@ public class TestGearsES2NEWT extends UITestCase { } else if(args[i].equals("-demo")) { i++; demoType = MiscUtils.atoi(args[i], 0); + } else if(args[i].equals("-traceMouse")) { + traceMouse = true; } } wsize = new Dimension(w, h); @@ -555,6 +562,7 @@ public class TestGearsES2NEWT extends UITestCase { System.err.println("sysExitWithin "+sysExit); System.err.println("mappedBuffers "+useMappedBuffers); System.err.println("demoType "+demoType); + System.err.println("traceMouse "+traceMouse); if(waitForKey) { JunitTracer.waitForKey("Start"); -- cgit v1.2.3