aboutsummaryrefslogtreecommitdiffstats
path: root/src/newt/classes/jogamp
diff options
context:
space:
mode:
authorSven Gothel <[email protected]>2013-06-17 12:59:24 +0200
committerSven Gothel <[email protected]>2013-06-17 12:59:24 +0200
commitf2182cfbf4cf77ba3f53b5b3e1c53e9dd42691a5 (patch)
tree35a6c068b81801125702d4a9e777fde0b0e7e78c /src/newt/classes/jogamp
parent343c3b3d0204c678156ce3b1a0a667bf90541c18 (diff)
Fix regression of 31e72d2f2d953352b2a8c83368039ecca8139d49: Modifier SHIFT needs to be recognized (-> horiz. scroll)
Diffstat (limited to 'src/newt/classes/jogamp')
-rw-r--r--src/newt/classes/jogamp/newt/driver/x11/WindowDriver.java5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/newt/classes/jogamp/newt/driver/x11/WindowDriver.java b/src/newt/classes/jogamp/newt/driver/x11/WindowDriver.java
index 2eb07e00b..c752977a9 100644
--- a/src/newt/classes/jogamp/newt/driver/x11/WindowDriver.java
+++ b/src/newt/classes/jogamp/newt/driver/x11/WindowDriver.java
@@ -241,16 +241,17 @@ public class WindowDriver extends WindowImpl {
}
break;
case MouseEvent.EVENT_MOUSE_RELEASED:
+ final boolean shiftPressed = 0 != ( modifiers & InputEvent.SHIFT_MASK );
switch(button) {
case X11_WHEEL_ONE_UP_BUTTON: // vertical scroll up
eventType = MouseEvent.EVENT_MOUSE_WHEEL_MOVED;
button = 1;
- rotationXYZ[1] = 1;
+ rotationXYZ[shiftPressed ? 0 : 1] = 1;
break;
case X11_WHEEL_ONE_DOWN_BUTTON: // vertical scroll down
eventType = MouseEvent.EVENT_MOUSE_WHEEL_MOVED;
button = 1;
- rotationXYZ[1] = -1;
+ rotationXYZ[shiftPressed ? 0 : 1] = -1;
break;
case X11_WHEEL_TWO_UP_BUTTON: // horizontal scroll left
eventType = MouseEvent.EVENT_MOUSE_WHEEL_MOVED;