aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSven Gothel <[email protected]>2012-04-27 01:19:51 +0200
committerSven Gothel <[email protected]>2012-04-27 01:19:51 +0200
commit4efc9344af1c4aa7d00c7b40e5caf063efdf6080 (patch)
tree1052b11c80cf60eb5faf92d159f66cd51473923c
parent2fb0464ca8c2273ebc1e1e7ad6a79639dd17bcab (diff)
Fix Bug 571: X11 behavior, where the PRESSED button is not included in the native mask.
-rw-r--r--src/newt/classes/jogamp/newt/WindowImpl.java5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/newt/classes/jogamp/newt/WindowImpl.java b/src/newt/classes/jogamp/newt/WindowImpl.java
index f82f4b7d4..6b3fd7aa4 100644
--- a/src/newt/classes/jogamp/newt/WindowImpl.java
+++ b/src/newt/classes/jogamp/newt/WindowImpl.java
@@ -2030,9 +2030,12 @@ public abstract class WindowImpl implements Window, NEWTEventConsumer
lastMousePosition.setX(x);
lastMousePosition.setY(y);
}
- if(button<0||button>MouseEvent.BUTTON_NUMBER) {
+ if( 0 > button || button > MouseEvent.BUTTON_NUMBER ) {
throw new NativeWindowException("Invalid mouse button number" + button);
}
+ // Fixes Bug 571: X11 behavior, where the PRESSED button is not included in the native mask.
+ modifiers |= InputEvent.getButtonMask(button);
+
MouseEvent eClicked = null;
MouseEvent e = null;