jdk/src/share/classes/java/awt/Container.java
changeset 5277 03170721df2e
parent 4263 db2d1f69a60e
child 5506 202f599c92aa
--- a/jdk/src/share/classes/java/awt/Container.java	Wed Jul 05 17:08:50 2017 +0200
+++ b/jdk/src/share/classes/java/awt/Container.java	Wed Apr 14 15:28:37 2010 +0400
@@ -4492,7 +4492,10 @@
             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 @@
                     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();
+            }
         }
     }