From 6fd19a9248c01c1d6fed1338a1b41d7ed4277c57 Mon Sep 17 00:00:00 2001 From: kizune Date: Mon, 13 Aug 2012 19:49:04 +0400 Subject: [PATCH] 7177144: [macosx] Drag and drop not working (regression in 7u6) Reviewed-by: art, serb --- src/share/classes/java/awt/EventQueue.java | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/share/classes/java/awt/EventQueue.java b/src/share/classes/java/awt/EventQueue.java index 86ea84af8..c163a9bb4 100644 --- a/src/share/classes/java/awt/EventQueue.java +++ b/src/share/classes/java/awt/EventQueue.java @@ -36,6 +36,8 @@ import java.security.AccessController; import java.security.PrivilegedAction; import java.util.EmptyStackException; + +import sun.awt.dnd.SunDropTargetEvent; import sun.util.logging.PlatformLogger; import sun.awt.AppContext; @@ -464,7 +466,9 @@ public class EventQueue { case MouseEvent.MOUSE_MOVED: return MOVE; case MouseEvent.MOUSE_DRAGGED: - return DRAG; + // Return -1 for SunDropTargetEvent since they are usually synchronous + // and we don't want to skip them by coalescing with MouseEvent or other drag events + return e instanceof SunDropTargetEvent ? -1 : DRAG; default: return e instanceof PeerEvent ? PEER : -1; } -- GitLab