< prev index next >
src/java.desktop/macosx/classes/sun/lwawt/macosx/LWCToolkit.java
Print this page
*** 105,114 ****
--- 105,115 ----
import sun.awt.CGraphicsDevice;
import sun.awt.LightweightFrame;
import sun.awt.PlatformGraphicsInfo;
import sun.awt.SunToolkit;
import sun.awt.datatransfer.DataTransferer;
+ import sun.awt.dnd.SunDragSourceContextPeer;
import sun.awt.util.ThreadGroupUtils;
import sun.java2d.opengl.OGLRenderQueue;
import sun.lwawt.LWComponentPeer;
import sun.lwawt.LWCursorManager;
import sun.lwawt.LWToolkit;
*** 461,470 ****
--- 462,478 ----
desktopProperties.put("DnD.Cursor.LinkNoDrop", new NamedCursor("DnD.Cursor.LinkNoDrop"));
}
@Override
protected boolean syncNativeQueue(long timeout) {
+ if (SunDragSourceContextPeer.isDragDropInProgress()
+ || EventQueue.isDispatchThread()) {
+ // The java code started the DnD, but the native drag may still not
+ // start, the last attempt to flush the native events,
+ // also do not block EDT for a long time
+ timeout = 50;
+ }
return nativeSyncQueue(timeout);
}
@Override
public native void beep();
< prev index next >