diff options
author | Roman Kennke <roman@kennke.org> | 2006-07-21 17:27:23 +0000 |
---|---|---|
committer | Roman Kennke <roman@kennke.org> | 2006-07-21 17:27:23 +0000 |
commit | 736b36b62d6dd2f5e0050c326b387575c1ce8a83 (patch) | |
tree | 6a091b20731a25f31a5d83e88f494f92064a3125 | |
parent | 0a64331e50a6d4096d4683aba5d1650fed6e6792 (diff) | |
download | classpath-736b36b62d6dd2f5e0050c326b387575c1ce8a83.tar.gz |
2006-07-20 Roman Kennke <kennke@aicas.com>
* java/awt/LightweightDispatcher.java
(findTarget): Also consider components that have their eventMask
set, for compatibility with stonage AWT. Optimized check
for MouseListener.
(handleMouseEvent): Likewise.
-rw-r--r-- | ChangeLog | 8 | ||||
-rw-r--r-- | java/awt/LightweightDispatcher.java | 14 |
2 files changed, 18 insertions, 4 deletions
@@ -1,5 +1,13 @@ 2006-07-20 Roman Kennke <kennke@aicas.com> + * java/awt/LightweightDispatcher.java + (findTarget): Also consider components that have their eventMask + set, for compatibility with stonage AWT. Optimized check + for MouseListener. + (handleMouseEvent): Likewise. + +2006-07-20 Roman Kennke <kennke@aicas.com> + * javax/swing/JTable.java (tableChanged): Split out handling of the event into multiple subroutines. diff --git a/java/awt/LightweightDispatcher.java b/java/awt/LightweightDispatcher.java index e777145b0..05f88dcf6 100644 --- a/java/awt/LightweightDispatcher.java +++ b/java/awt/LightweightDispatcher.java @@ -152,8 +152,11 @@ class LightweightDispatcher target = findTarget(parent, loc); while (target == null && parent != null) { - if (parent.getMouseListeners().length > 0 - || parent.getMouseMotionListeners().length > 0) + if (parent.mouseListener != null + || parent.mouseMotionListener != null + || (parent.eventMask + & (AWTEvent.MOUSE_EVENT_MASK + | AWTEvent.MOUSE_MOTION_EVENT_MASK)) != 0) { target = parent; } @@ -297,8 +300,11 @@ class LightweightDispatcher if (child.isShowing()) { if (child.contains(loc.x - child.getX(), loc.y - child.getY()) - && (child.getMouseListeners().length > 0 - || child.getMouseMotionListeners().length > 0)) + && (child.mouseListener != null + || child.mouseMotionListener != null + || (child.eventMask + & (AWTEvent.MOUSE_EVENT_MASK + | AWTEvent.MOUSE_MOTION_EVENT_MASK)) != 0)) { target = child; break; |