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] removing drag check in handleEvent for Container


Hi,

This patch removes the check for drag events and forwards them to the
proper component. David fixed this a while back but I didn't catch it.

Cheers,

Kim

2004-03-10  Kim Ho  <kho@redhat.com>

	* java/awt/Container.java: Remove check
	for drag events.


Index: java/awt/Container.java
===================================================================
RCS file: /cvs/gcc/gcc/libjava/java/awt/Container.java,v
retrieving revision 1.34.2.5
diff -u -r1.34.2.5 Container.java
--- java/awt/Container.java	10 Mar 2004 15:48:00 -0000	1.34.2.5
+++ java/awt/Container.java	10 Mar 2004 21:37:01 -0000
@@ -1669,22 +1669,7 @@
         MouseEvent me = (MouseEvent) e;
 
         acquireComponentForMouseEvent(me);
-	  
-	// If the event is a drag, then we have to dispatch 
-	// to the component who was last pressed. We can't
-	// use mouseEventTarget since the target should
-	// still be able to move. (For mouse move events).
-	if (e.getID() == MouseEvent.MOUSE_DRAGGED && 
-	    pressedComponent != null && 
-	    pressedComponent.isShowing())
-	{
-	  MouseEvent newEvt = 
-	    SwingUtilities.convertMouseEvent(nativeContainer, me,
-	                                     pressedComponent);
-          pressedComponent.dispatchEvent(newEvt);
-	  return e.isConsumed();
-	}
-
+	
         // Avoid dispatching ENTERED and EXITED events twice.
         if (mouseEventTarget != null
             && mouseEventTarget.isShowing()

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