This is the mail archive of the java-patches@gcc.gnu.org mailing list for the Java project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

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



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]