diff options
author | Robert Schuster <theBohemian@gmx.net> | 2006-03-23 21:17:22 +0000 |
---|---|---|
committer | Robert Schuster <theBohemian@gmx.net> | 2006-03-23 21:17:22 +0000 |
commit | 9e509528881d864d984668ea6ca5bf3a3faa9fbd (patch) | |
tree | 34c5c81eb4e4d93981ace4bdff9718d2549e2066 /java | |
parent | a31fefec2937754057192fad30a5286840952b81 (diff) | |
download | classpath-9e509528881d864d984668ea6ca5bf3a3faa9fbd.tar.gz |
Fixes PR #26737.
2006-03-21 Robert Schuster <robertschuster@fsfe.org>
* java/awt/Component.java:
(processMouseEvent): Remove call to consume event.
(dispatchEventImpl): Handle specific events first, do focus request
only when mouse event was not yet consumed.
* javax/swing/text/DefaultCaret.java:
(mousePressed): Rewritten.
Diffstat (limited to 'java')
-rw-r--r-- | java/awt/Component.java | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/java/awt/Component.java b/java/awt/Component.java index 9797c04ae..1dc8e3fec 100644 --- a/java/awt/Component.java +++ b/java/awt/Component.java @@ -3101,7 +3101,6 @@ public abstract class Component mouseListener.mouseReleased(e); break; } - e.consume(); } /** @@ -4934,6 +4933,10 @@ p * <li>the set of backward traversal keys if (eventTypeEnabled (e.id)) { + if (e.id != PaintEvent.PAINT && e.id != PaintEvent.UPDATE + && !ignoreFocus) + processEvent(e); + // the trick we use to communicate between dispatch and redispatch // is to have KeyboardFocusManager.redispatch synchronize on the // object itself. we then do not redispatch to KeyboardFocusManager @@ -4954,14 +4957,11 @@ p * <li>the set of backward traversal keys .dispatchEvent(e)) return; case MouseEvent.MOUSE_PRESSED: - if (isLightweight()) - requestFocus(); + if (isLightweight() && !e.isConsumed()) + requestFocus(); break; } } - if (e.id != PaintEvent.PAINT && e.id != PaintEvent.UPDATE - && !ignoreFocus) - processEvent(e); } if (peer != null) |