diff options
author | Mark Wielaard <mark@klomp.org> | 2006-03-14 19:42:49 +0000 |
---|---|---|
committer | Mark Wielaard <mark@klomp.org> | 2006-03-14 19:42:49 +0000 |
commit | b410bb398821cad89e45b6f7bcc8a78858ae2ea5 (patch) | |
tree | 262d1e36a5cab3bdff006f64d4b66b5246f03186 /java | |
parent | 25f343f53789312009db619e1530d5267bcf9e96 (diff) | |
download | classpath-b410bb398821cad89e45b6f7bcc8a78858ae2ea5.tar.gz |
Fixes bug #26641
* java/awt/LightweightDispatcher.java (dispatchEvent): Return result
of handleMouseEvent.
(handleMouseEvent): Return boolean to indicate whether we handled the
event by passing it to a lightweight.
Diffstat (limited to 'java')
-rw-r--r-- | java/awt/LightweightDispatcher.java | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/java/awt/LightweightDispatcher.java b/java/awt/LightweightDispatcher.java index 6573b128e..2f254bccf 100644 --- a/java/awt/LightweightDispatcher.java +++ b/java/awt/LightweightDispatcher.java @@ -110,14 +110,12 @@ class LightweightDispatcher */ public boolean dispatchEvent(AWTEvent event) { - boolean dispatched = false; if (event instanceof MouseEvent && event.getSource() instanceof Window) { MouseEvent mouseEvent = (MouseEvent) event; - handleMouseEvent(mouseEvent); - dispatched = true; + return handleMouseEvent(mouseEvent); } - return dispatched; + return false; } /** @@ -125,8 +123,9 @@ class LightweightDispatcher * (Window instances) and dispatches them to the correct lightweight child. * * @param ev the mouse event + * @return whether or not we found a lightweight that handled the event. */ - private void handleMouseEvent(MouseEvent ev) + private boolean handleMouseEvent(MouseEvent ev) { Window window = (Window) ev.getSource(); Component target = window.findComponentAt(ev.getX(), ev.getY()); @@ -195,6 +194,9 @@ class LightweightDispatcher // influenced by this modified event. ev.setSource(window); ev.translatePoint(-dx, -dy); + return true; } + else + return false; } } |