summaryrefslogtreecommitdiffstats
path: root/src/newt/classes/com/jogamp
diff options
context:
space:
mode:
authorSven Gothel <[email protected]>2014-01-04 17:20:00 +0100
committerSven Gothel <[email protected]>2014-01-04 17:20:00 +0100
commit2d3a311b7863ed598865f19833417abb6e27a513 (patch)
treea1d37db2ae884b69632f756f8ae2c8533ee3d926 /src/newt/classes/com/jogamp
parentbec29cf970e6a55eb8f720afdae5a3bdc97c1ba2 (diff)
JOGLNewtAppletBase Default Key-Action: Add 'j' for setPointerConfined() .. i.e. 'jailed'
Diffstat (limited to 'src/newt/classes/com/jogamp')
-rw-r--r--src/newt/classes/com/jogamp/newt/awt/applet/JOGLNewtAppletBase.java9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/newt/classes/com/jogamp/newt/awt/applet/JOGLNewtAppletBase.java b/src/newt/classes/com/jogamp/newt/awt/applet/JOGLNewtAppletBase.java
index eac328cdd..7ffbc2e83 100644
--- a/src/newt/classes/com/jogamp/newt/awt/applet/JOGLNewtAppletBase.java
+++ b/src/newt/classes/com/jogamp/newt/awt/applet/JOGLNewtAppletBase.java
@@ -364,6 +364,15 @@ public class JOGLNewtAppletBase implements KeyListener, GLEventListener {
glWindow.setPointerVisible(!glWindow.isPointerVisible());
System.err.println("[set mouse visible post]: "+glWindow.isPointerVisible());
} }.start();
+ } else if(e.getKeyChar()=='j') {
+ new Thread() {
+ public void run() {
+ final Thread t = glWindow.setExclusiveContextThread(null);
+ System.err.println("[set mouse confined pre]: "+glWindow.isPointerConfined());
+ glWindow.confinePointer(!glWindow.isPointerConfined());
+ System.err.println("[set mouse confined post]: "+glWindow.isPointerConfined());
+ glWindow.setExclusiveContextThread(t);
+ } }.start();
} else if(e.getKeyChar()=='w') {
new Thread() {
public void run() {