--- a/jdk/src/macosx/classes/com/apple/laf/AquaScrollPaneUI.java Wed May 30 14:46:49 2012 +0400
+++ b/jdk/src/macosx/classes/com/apple/laf/AquaScrollPaneUI.java Wed May 30 14:58:30 2012 +0400
@@ -60,6 +60,10 @@
if (wasVisible) {
vScrollBar.setVisible(true);
}
+
+ // Consume the event even when the scrollBar is invisible
+ // see #7124320
+ e.consume();
}
}
}
--- a/jdk/src/macosx/classes/sun/lwawt/macosx/CPlatformResponder.java Wed May 30 14:46:49 2012 +0400
+++ b/jdk/src/macosx/classes/sun/lwawt/macosx/CPlatformResponder.java Wed May 30 14:58:30 2012 +0400
@@ -109,8 +109,14 @@
final long when = System.currentTimeMillis();
final int scrollType = MouseWheelEvent.WHEEL_UNIT_SCROLL;
final int scrollAmount = 1;
+ int wheelRotation = (int) delta;
+ int signum = (int) Math.signum(delta);
+ if (signum * delta < 1) {
+ wheelRotation = signum;
+ }
+ // invert the wheelRotation for the peer
peer.dispatchMouseWheelEvent(when, x, y, modifiers, scrollType,
- scrollAmount, (int) -delta, -delta, null);
+ scrollAmount, -wheelRotation, -delta, null);
}
/**