summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSven Gothel <sgothel@jausoft.com>2015-10-05 09:06:39 +0200
committerSven Gothel <sgothel@jausoft.com>2015-10-05 09:06:39 +0200
commit8790d4a25410c51e747f4cdd7954ef8abbb7a68b (patch)
tree55bce00cde631b2920e86a69dc42c59f17979f2f
parent72d7f326f2d283ec0207d90b4203215146f88de6 (diff)
Bug 1223: Add '-traceMouse' commandline argument to check whether mouse events are still received after manual maximize
-rw-r--r--src/test/com/jogamp/opengl/test/junit/jogl/demos/es2/newt/TestGearsES2NEWT.java8
1 files changed, 8 insertions, 0 deletions
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 c821111..cbc2606 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");