[gui][PATCH] MenuItem event processing fix

Thomas Fitzsimmons fitzsim@redhat.com
Sat Jun 12 00:31:00 GMT 2004


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);
 }
 
 /**




More information about the Java-patches mailing list