mirror of
https://github.com/openjdk/jdk.git
synced 2026-05-14 23:49:49 +00:00
7141296: [macosx] Mouse Wheel Turn closes combobox popup
Reviewed-by: rupashka
This commit is contained in:
parent
f904017c74
commit
da6cfab105
@ -60,6 +60,10 @@ public class AquaScrollPaneUI extends javax.swing.plaf.basic.BasicScrollPaneUI {
|
||||
if (wasVisible) {
|
||||
vScrollBar.setVisible(true);
|
||||
}
|
||||
|
||||
// Consume the event even when the scrollBar is invisible
|
||||
// see #7124320
|
||||
e.consume();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -109,8 +109,14 @@ final class CPlatformResponder {
|
||||
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);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user