changeset 6039:c85fa4a6df4e

7178079: REGRESSION: Some AWT Drag-n-Drop tests fail since JDK 7u6 b13 Reviewed-by: anthony, serb
author kizune
date Fri, 06 Jul 2012 13:37:10 +0400
parents 9fb1e142ebe6
children e9b5b26b670e
files src/macosx/classes/sun/lwawt/macosx/CDropTargetContextPeer.java src/share/classes/sun/awt/dnd/SunDropTargetContextPeer.java
diffstat 2 files changed, 10 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/src/macosx/classes/sun/lwawt/macosx/CDropTargetContextPeer.java	Mon Jul 02 19:32:35 2012 +0100
+++ b/src/macosx/classes/sun/lwawt/macosx/CDropTargetContextPeer.java	Fri Jul 06 13:37:10 2012 +0400
@@ -128,6 +128,15 @@
         }
     }
 
+    @Override
+    protected int postDropTargetEvent(Component component, int x, int y, int dropAction,
+                                      int actions, long[] formats, long nativeCtxt, int eventID,
+                                      boolean dispatchType) {
+        // On MacOS X all the DnD events should be synchronous
+        return super.postDropTargetEvent(component, x, y, dropAction, actions, formats, nativeCtxt,
+                eventID, SunDropTargetContextPeer.DISPATCH_SYNC);
+    }
+
     // Signal drop complete:
     protected void doDropDone(boolean success, int dropAction, boolean isLocal) {
         long nativeDropTarget = this.getNativeDragContext();
--- a/src/share/classes/sun/awt/dnd/SunDropTargetContextPeer.java	Mon Jul 02 19:32:35 2012 +0100
+++ b/src/share/classes/sun/awt/dnd/SunDropTargetContextPeer.java	Fri Jul 06 13:37:10 2012 +0400
@@ -498,7 +498,7 @@
         postDropTargetEvent(component, x, y, dropAction, actions,
                             formats, nativeCtxt,
                             SunDropTargetEvent.MOUSE_DROPPED,
-                            SunDropTargetContextPeer.DISPATCH_SYNC);
+                            !SunDropTargetContextPeer.DISPATCH_SYNC);
     }
 
     /**