Merge
This commit is contained in:
commit
4e53387036
jdk/src/share/classes
@ -4941,9 +4941,13 @@ public abstract class Component implements ImageObserver, MenuContainer,
|
||||
// If we dispatch the event to toplevel ancestor,
|
||||
// this could encolse the loop: 6480024.
|
||||
anc.dispatchEventToSelf(newMWE);
|
||||
if (newMWE.isConsumed()) {
|
||||
e.consume();
|
||||
}
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return true;
|
||||
return false;
|
||||
}
|
||||
|
||||
boolean checkWindowClosingException() {
|
||||
|
@ -4492,7 +4492,10 @@ class LightweightDispatcher implements java.io.Serializable, AWTEventListener {
|
||||
retargetMouseEvent(mouseOver, id, e);
|
||||
break;
|
||||
}
|
||||
e.consume();
|
||||
//Consuming of wheel events is implemented in "retargetMouseEvent".
|
||||
if (id != MouseEvent.MOUSE_WHEEL) {
|
||||
e.consume();
|
||||
}
|
||||
}
|
||||
return e.isConsumed();
|
||||
}
|
||||
@ -4800,6 +4803,12 @@ class LightweightDispatcher implements java.io.Serializable, AWTEventListener {
|
||||
target.dispatchEvent(retargeted);
|
||||
}
|
||||
}
|
||||
if (id == MouseEvent.MOUSE_WHEEL && retargeted.isConsumed()) {
|
||||
//An exception for wheel bubbling to the native system.
|
||||
//In "processMouseEvent" total event consuming for wheel events is skipped.
|
||||
//Protection from bubbling of Java-accepted wheel events.
|
||||
e.consume();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -870,6 +870,8 @@ public class BasicScrollPaneUI
|
||||
orientation = SwingConstants.HORIZONTAL;
|
||||
}
|
||||
|
||||
e.consume();
|
||||
|
||||
if (e.getScrollType() == MouseWheelEvent.WHEEL_UNIT_SCROLL) {
|
||||
JViewport vp = scrollpane.getViewport();
|
||||
if (vp == null) { return; }
|
||||
|
Loading…
x
Reference in New Issue
Block a user