Mercurial > hg > openjdk > icedtea > jdk7 > jdk
changeset 5506:fc870376e780
7177144: [macosx] Drag and drop not working (regression in 7u6)
Reviewed-by: art, bagiras
author | kizune |
---|---|
date | Thu, 19 Jul 2012 20:11:20 +0400 |
parents | 5e92a5e288f2 |
children | cbb4a165d660 |
files | src/share/classes/java/awt/EventQueue.java |
diffstat | 1 files changed, 10 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/src/share/classes/java/awt/EventQueue.java Thu Jul 19 14:54:59 2012 +0400 +++ b/src/share/classes/java/awt/EventQueue.java Thu Jul 19 20:11:20 2012 +0400 @@ -36,6 +36,8 @@ import java.security.PrivilegedAction; import java.util.EmptyStackException; + +import sun.awt.dnd.SunDropTargetEvent; import sun.util.logging.PlatformLogger; import sun.awt.AppContext; @@ -349,6 +351,10 @@ } private boolean coalesceMouseEvent(MouseEvent e) { + if (e instanceof SunDropTargetEvent) { + // SunDropTargetEvent should not coalesce with MouseEvent + return false; + } EventQueueItem[] cache = ((Component)e.getSource()).eventCache; if (cache == null) { return false; @@ -428,6 +434,10 @@ } private void cacheEQItem(EventQueueItem entry) { + if(entry.event instanceof SunDropTargetEvent) { + // Do not cache SunDropTargetEvent, it should not coalesce + return; + } int index = eventToCacheIndex(entry.event); if (index != -1 && entry.event.getSource() instanceof Component) { Component source = (Component)entry.event.getSource();