When an object is moved from one window (DnD source) to another window (DnD target) the first window may also be considered as a DnD target and the native OS sends corresponding events to it. That event processing clears isInDoDragDropLoop flag, which is currently used to indicate DnD operation, and causes a hang.
Fix: It is necessary to distinguish events related to the DnD source and events related to the DnD target, (i.e. use two indication flags). Testing:
mach5 green ------------- Commit messages: - 8274751: Drag And Drop hangs on Windows Changes: https://git.openjdk.java.net/jdk/pull/7125/files Webrev: https://webrevs.openjdk.java.net/?repo=jdk&pr=7125&range=00 Issue: https://bugs.openjdk.java.net/browse/JDK-8274751 Stats: 19 lines in 4 files changed: 2 ins; 0 del; 17 mod Patch: https://git.openjdk.java.net/jdk/pull/7125.diff Fetch: git fetch https://git.openjdk.java.net/jdk pull/7125/head:pull/7125 PR: https://git.openjdk.java.net/jdk/pull/7125