I submitted bug report #13658 yesterday.
https://savannah.gnu.org/bugs/?func=detailitem&item_id=13658
This patch fixes the problem but needs review.
Rather than calling popopWillBeMadeInvisible I could also just manually
disable the mouseListener, but I didn't want to copy the code.
Patch is attached.
-Tony
Index: javax/swing/plaf/basic/BasicPopupMenuUI.java
===================================================================
RCS file: /cvsroot/classpath/classpath/javax/swing/plaf/basic/BasicPopupMenuUI.java,v
retrieving revision 1.11
diff -u -r1.11 BasicPopupMenuUI.java
--- javax/swing/plaf/basic/BasicPopupMenuUI.java 2 Jul 2005 20:32:50 -0000 1.11
+++ javax/swing/plaf/basic/BasicPopupMenuUI.java 7 Jul 2005 18:38:43 -0000
@@ -466,6 +466,9 @@
*/
public void mouseExited(MouseEvent e)
{
+ //we call popupMenuWillBecomeInvisible to remove the mouse listeners
+ //otherwise we can run into trouble when entering other components
+ popupMenuListener.popupMenuWillBecomeInvisible(new PopupMenuEvent(e));
handleEvent(e);
}
@@ -557,7 +560,6 @@
lastComponentEntered = null;
tempComponent.dispatchEvent(exited);
}
-
lastComponentEntered = null;
}
@@ -622,6 +624,8 @@
{
if (e instanceof MouseEvent)
{
+ if (((MouseEvent)e).isConsumed())
+ return;
MouseEvent me = (MouseEvent) e;
acquireComponentForMouseEvent(me);
_______________________________________________
Classpath-patches mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/classpath-patches