This is the mail archive of the
java-patches@gcc.gnu.org
mailing list for the Java project.
[gui][PATCH] MenuItem event processing fix
- From: Thomas Fitzsimmons <fitzsim at redhat dot com>
- To: java-patches at gcc dot gnu dot org
- Date: Fri, 11 Jun 2004 20:23:17 -0400
- Subject: [gui][PATCH] MenuItem event processing fix
Hi,
I committed this fix to java-gui-branch.
Tom
2004-06-11 Thomas Fitzsimmons <fitzsim@redhat.com>
* java/awt/MenuItem.java (dispatchEventImpl): If the event
wasn't consumed by normal processing, send it to the parent
menu.
Index: java/awt/MenuItem.java
===================================================================
RCS file: /cvs/gcc/gcc/libjava/java/awt/MenuItem.java,v
retrieving revision 1.16.2.1
diff -u -r1.16.2.1 MenuItem.java
--- java/awt/MenuItem.java 26 Mar 2004 17:06:34 -0000 1.16.2.1
+++ java/awt/MenuItem.java 12 Jun 2004 00:19:34 -0000
@@ -424,6 +424,11 @@
&& (action_listeners != null
|| (eventMask & AWTEvent.ACTION_EVENT_MASK) != 0))
processEvent(e);
+
+ // Send the event to the parent menu if it has not yet been
+ // consumed.
+ if (!e.isConsumed ())
+ ((Menu) getParent ()).processEvent (e);
}
/**