From f2182cfbf4cf77ba3f53b5b3e1c53e9dd42691a5 Mon Sep 17 00:00:00 2001 From: Sven Gothel Date: Mon, 17 Jun 2013 12:59:24 +0200 Subject: Fix regression of 31e72d2f2d953352b2a8c83368039ecca8139d49: Modifier SHIFT needs to be recognized (-> horiz. scroll) --- src/newt/classes/jogamp/newt/driver/x11/WindowDriver.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'src') 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; -- cgit v1.2.3