Skip to content

Commit

Permalink
Fix regression of 31e72d2: Modifier SHIFT needs to be recognized (-> …
Browse files Browse the repository at this point in the history
…horiz. scroll)
  • Loading branch information
sgothel committed Jun 17, 2013
1 parent 343c3b3 commit f2182cf
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/newt/classes/jogamp/newt/driver/x11/WindowDriver.java
Original file line number Diff line number Diff line change
Expand Up @@ -241,16 +241,17 @@ protected final void doMouseEvent(boolean enqueue, boolean wait, short eventType
}
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;
Expand Down

0 comments on commit f2182cf

Please sign in to comment.