Re: RFR: 8262446: DragAndDrop hangs on Windows
On Thu, 4 Mar 2021 10:36:56 GMT, Dmitry Markov wrote: > The IME functions and the DND operation must be executed on the toolkit > thread. If the DND operation is in progress, the IME API is invoked via > SendMessage() call inside InvokeInputMethodFunction() to avoid a hang. The > flag isInDoDragDropLoop indicates whether the DND takes place or not. The > flag works properly if the DND is performed between two Java windows. However > if anything is dragged from native app, (e.g. Windows FileExplorer) to Java > the flag is NOT set. That’s the root cause of the hang. > > Fix: > Introduce a new flag to indicate DND operation between Java and native app. > > Testing: > mach5 green > @dmarkov20 > Sorry I'm not reviewer. > It seems Copyright year is not changed. Is it OK ? I have updated the copyright - PR: https://git.openjdk.java.net/jdk/pull/2825
Re: RFR: 8262446: DragAndDrop hangs on Windows [v4]
> The IME functions and the DND operation must be executed on the toolkit > thread. If the DND operation is in progress, the IME API is invoked via > SendMessage() call inside InvokeInputMethodFunction() to avoid a hang. The > flag isInDoDragDropLoop indicates whether the DND takes place or not. The > flag works properly if the DND is performed between two Java windows. However > if anything is dragged from native app, (e.g. Windows FileExplorer) to Java > the flag is NOT set. That’s the root cause of the hang. > > Fix: > Introduce a new flag to indicate DND operation between Java and native app. > > Testing: > mach5 green Dmitry Markov has updated the pull request incrementally with one additional commit since the last revision: Update copyright - Changes: - all: https://git.openjdk.java.net/jdk/pull/2825/files - new: https://git.openjdk.java.net/jdk/pull/2825/files/dbc9dac7..3810f1b0 Webrevs: - full: https://webrevs.openjdk.java.net/?repo=jdk&pr=2825&range=03 - incr: https://webrevs.openjdk.java.net/?repo=jdk&pr=2825&range=02-03 Stats: 1 line in 1 file changed: 0 ins; 0 del; 1 mod Patch: https://git.openjdk.java.net/jdk/pull/2825.diff Fetch: git fetch https://git.openjdk.java.net/jdk pull/2825/head:pull/2825 PR: https://git.openjdk.java.net/jdk/pull/2825
Re: RFR: 8262446: DragAndDrop hangs on Windows [v3]
On Fri, 5 Mar 2021 17:21:36 GMT, Dmitry Markov wrote: >> The IME functions and the DND operation must be executed on the toolkit >> thread. If the DND operation is in progress, the IME API is invoked via >> SendMessage() call inside InvokeInputMethodFunction() to avoid a hang. The >> flag isInDoDragDropLoop indicates whether the DND takes place or not. The >> flag works properly if the DND is performed between two Java windows. >> However if anything is dragged from native app, (e.g. Windows FileExplorer) >> to Java the flag is NOT set. That’s the root cause of the hang. >> >> Fix: >> Introduce a new flag to indicate DND operation between Java and native app. >> >> Testing: >> mach5 green > > Dmitry Markov has updated the pull request incrementally with one additional > commit since the last revision: > > Remove flag setting from DragOver Marked as reviewed by kizune (Reviewer). - PR: https://git.openjdk.java.net/jdk/pull/2825
Re: RFR: 8262446: DragAndDrop hangs on Windows
On Thu, 4 Mar 2021 10:36:56 GMT, Dmitry Markov wrote: > The IME functions and the DND operation must be executed on the toolkit > thread. If the DND operation is in progress, the IME API is invoked via > SendMessage() call inside InvokeInputMethodFunction() to avoid a hang. The > flag isInDoDragDropLoop indicates whether the DND takes place or not. The > flag works properly if the DND is performed between two Java windows. However > if anything is dragged from native app, (e.g. Windows FileExplorer) to Java > the flag is NOT set. That’s the root cause of the hang. > > Fix: > Introduce a new flag to indicate DND operation between Java and native app. > > Testing: > mach5 green @dmarkov20 Sorry I'm not reviewer. It seems Copyright year is not changed. Is it OK ? - PR: https://git.openjdk.java.net/jdk/pull/2825
Re: RFR: 8262446: DragAndDrop hangs on Windows [v3]
On Fri, 5 Mar 2021 17:21:36 GMT, Dmitry Markov wrote: >> The IME functions and the DND operation must be executed on the toolkit >> thread. If the DND operation is in progress, the IME API is invoked via >> SendMessage() call inside InvokeInputMethodFunction() to avoid a hang. The >> flag isInDoDragDropLoop indicates whether the DND takes place or not. The >> flag works properly if the DND is performed between two Java windows. >> However if anything is dragged from native app, (e.g. Windows FileExplorer) >> to Java the flag is NOT set. That’s the root cause of the hang. >> >> Fix: >> Introduce a new flag to indicate DND operation between Java and native app. >> >> Testing: >> mach5 green > > Dmitry Markov has updated the pull request incrementally with one additional > commit since the last revision: > > Remove flag setting from DragOver Marked as reviewed by serb (Reviewer). - PR: https://git.openjdk.java.net/jdk/pull/2825
Re: RFR: 8262446: DragAndDrop hangs on Windows [v3]
On Fri, 5 Mar 2021 17:21:36 GMT, Dmitry Markov wrote: >> The IME functions and the DND operation must be executed on the toolkit >> thread. If the DND operation is in progress, the IME API is invoked via >> SendMessage() call inside InvokeInputMethodFunction() to avoid a hang. The >> flag isInDoDragDropLoop indicates whether the DND takes place or not. The >> flag works properly if the DND is performed between two Java windows. >> However if anything is dragged from native app, (e.g. Windows FileExplorer) >> to Java the flag is NOT set. That’s the root cause of the hang. >> >> Fix: >> Introduce a new flag to indicate DND operation between Java and native app. >> >> Testing: >> mach5 green > > Dmitry Markov has updated the pull request incrementally with one additional > commit since the last revision: > > Remove flag setting from DragOver Marked as reviewed by aivanov (Reviewer). - PR: https://git.openjdk.java.net/jdk/pull/2825
Re: RFR: 8262446: DragAndDrop hangs on Windows [v3]
> The IME functions and the DND operation must be executed on the toolkit > thread. If the DND operation is in progress, the IME API is invoked via > SendMessage() call inside InvokeInputMethodFunction() to avoid a hang. The > flag isInDoDragDropLoop indicates whether the DND takes place or not. The > flag works properly if the DND is performed between two Java windows. However > if anything is dragged from native app, (e.g. Windows FileExplorer) to Java > the flag is NOT set. That’s the root cause of the hang. > > Fix: > Introduce a new flag to indicate DND operation between Java and native app. > > Testing: > mach5 green Dmitry Markov has updated the pull request incrementally with one additional commit since the last revision: Remove flag setting from DragOver - Changes: - all: https://git.openjdk.java.net/jdk/pull/2825/files - new: https://git.openjdk.java.net/jdk/pull/2825/files/d9af9879..dbc9dac7 Webrevs: - full: https://webrevs.openjdk.java.net/?repo=jdk&pr=2825&range=02 - incr: https://webrevs.openjdk.java.net/?repo=jdk&pr=2825&range=01-02 Stats: 1 line in 1 file changed: 0 ins; 1 del; 0 mod Patch: https://git.openjdk.java.net/jdk/pull/2825.diff Fetch: git fetch https://git.openjdk.java.net/jdk pull/2825/head:pull/2825 PR: https://git.openjdk.java.net/jdk/pull/2825
Re: RFR: 8262446: DragAndDrop hangs on Windows [v2]
On Fri, 5 Mar 2021 17:01:41 GMT, Alexey Ivanov wrote: >> Dmitry Markov has updated the pull request incrementally with one additional >> commit since the last revision: >> >> reuse isInDoDragDropLoop > > src/java.desktop/windows/native/libawt/windows/awt_DnDDT.cpp line 228: > >> 226: HRESULT __stdcall AwtDropTarget::DragOver(DWORD grfKeyState, POINTL pt, >> DWORD __RPC_FAR *pdwEffect) { >> 227: TRY; >> 228: AwtToolkit::GetInstance().isInDoDragDropLoop = TRUE; > > This is a new addition. Did you miss this function in previous iteration? Good catch! Actually that line is harmless but it is really unnecessary. I will update PR - PR: https://git.openjdk.java.net/jdk/pull/2825
Re: RFR: 8262446: DragAndDrop hangs on Windows [v2]
On Fri, 5 Mar 2021 16:06:04 GMT, Dmitry Markov wrote: >> The IME functions and the DND operation must be executed on the toolkit >> thread. If the DND operation is in progress, the IME API is invoked via >> SendMessage() call inside InvokeInputMethodFunction() to avoid a hang. The >> flag isInDoDragDropLoop indicates whether the DND takes place or not. The >> flag works properly if the DND is performed between two Java windows. >> However if anything is dragged from native app, (e.g. Windows FileExplorer) >> to Java the flag is NOT set. That’s the root cause of the hang. >> >> Fix: >> Introduce a new flag to indicate DND operation between Java and native app. >> >> Testing: >> mach5 green > > Dmitry Markov has updated the pull request incrementally with one additional > commit since the last revision: > > reuse isInDoDragDropLoop Marked as reviewed by aivanov (Reviewer). src/java.desktop/windows/native/libawt/windows/awt_DnDDT.cpp line 228: > 226: HRESULT __stdcall AwtDropTarget::DragOver(DWORD grfKeyState, POINTL pt, > DWORD __RPC_FAR *pdwEffect) { > 227: TRY; > 228: AwtToolkit::GetInstance().isInDoDragDropLoop = TRUE; This is a new addition. Did you miss this function in previous iteration? - PR: https://git.openjdk.java.net/jdk/pull/2825
Re: RFR: 8262446: DragAndDrop hangs on Windows [v2]
On Fri, 5 Mar 2021 12:53:00 GMT, Dmitry Markov wrote: >>> Why we cannot reuse the old flag? "isInDoDragDropLoop"? I think the >>> Robot.waitForIdle() will hang if isInDoDragDropLoop is not set to true >>> while dragging something from the native app. >> >> Initially I didn’t want to touch that flag but after a closer look to >> “isInDoDragDropLoop” I think it is OK to reuse the flag. I will update PR >> shortly. > >> @dmarkov20 >> I'd like to confirm this issue was not fixed by >> [JDK-8261231](https://bugs.openjdk.java.net/browse/JDK-8261231) #2448 ? > > That's right. This one and JDK-8261231 are two different issues. It is > expected that the changes for JDK-8261231 do not fix this. I have update the fix: reuse isInDoDragDropLoop flag instead of introducing a new one. @mrserb @aivanov-jdk Could you take a look, please? - PR: https://git.openjdk.java.net/jdk/pull/2825
Re: RFR: 8262446: DragAndDrop hangs on Windows [v2]
On Fri, 5 Mar 2021 12:51:15 GMT, Dmitry Markov wrote: >> Why we cannot reuse the old flag? "isInDoDragDropLoop"? I think the >> Robot.waitForIdle() will hang if isInDoDragDropLoop is not set to true while >> dragging something from the native app. > >> Why we cannot reuse the old flag? "isInDoDragDropLoop"? I think the >> Robot.waitForIdle() will hang if isInDoDragDropLoop is not set to true while >> dragging something from the native app. > > Initially I didn’t want to touch that flag but after a closer look to > “isInDoDragDropLoop” I think it is OK to reuse the flag. I will update PR > shortly. > @dmarkov20 > I'd like to confirm this issue was not fixed by > [JDK-8261231](https://bugs.openjdk.java.net/browse/JDK-8261231) #2448 ? That's right. This one and JDK-8261231 are two different issues. It is expected that the changes for JDK-8261231 do not fix this. - PR: https://git.openjdk.java.net/jdk/pull/2825
Re: RFR: 8262446: DragAndDrop hangs on Windows [v2]
> The IME functions and the DND operation must be executed on the toolkit > thread. If the DND operation is in progress, the IME API is invoked via > SendMessage() call inside InvokeInputMethodFunction() to avoid a hang. The > flag isInDoDragDropLoop indicates whether the DND takes place or not. The > flag works properly if the DND is performed between two Java windows. However > if anything is dragged from native app, (e.g. Windows FileExplorer) to Java > the flag is NOT set. That’s the root cause of the hang. > > Fix: > Introduce a new flag to indicate DND operation between Java and native app. > > Testing: > mach5 green Dmitry Markov has updated the pull request incrementally with one additional commit since the last revision: reuse isInDoDragDropLoop - Changes: - all: https://git.openjdk.java.net/jdk/pull/2825/files - new: https://git.openjdk.java.net/jdk/pull/2825/files/6d7502a4..d9af9879 Webrevs: - full: https://webrevs.openjdk.java.net/?repo=jdk&pr=2825&range=01 - incr: https://webrevs.openjdk.java.net/?repo=jdk&pr=2825&range=00-01 Stats: 11 lines in 3 files changed: 1 ins; 2 del; 8 mod Patch: https://git.openjdk.java.net/jdk/pull/2825.diff Fetch: git fetch https://git.openjdk.java.net/jdk pull/2825/head:pull/2825 PR: https://git.openjdk.java.net/jdk/pull/2825
Re: RFR: 8262446: DragAndDrop hangs on Windows [v2]
On Fri, 5 Mar 2021 01:34:04 GMT, Sergey Bylokhov wrote: > Why we cannot reuse the old flag? "isInDoDragDropLoop"? I think the > Robot.waitForIdle() will hang if isInDoDragDropLoop is not set to true while > dragging something from the native app. Initially I didn’t want to touch that flag but after a closer look to “isInDoDragDropLoop” I think it is OK to reuse the flag. I will update PR shortly. - PR: https://git.openjdk.java.net/jdk/pull/2825
Re: RFR: 8262446: DragAndDrop hangs on Windows
On Thu, 4 Mar 2021 10:36:56 GMT, Dmitry Markov wrote: > The IME functions and the DND operation must be executed on the toolkit > thread. If the DND operation is in progress, the IME API is invoked via > SendMessage() call inside InvokeInputMethodFunction() to avoid a hang. The > flag isInDoDragDropLoop indicates whether the DND takes place or not. The > flag works properly if the DND is performed between two Java windows. However > if anything is dragged from native app, (e.g. Windows FileExplorer) to Java > the flag is NOT set. That’s the root cause of the hang. > > Fix: > Introduce a new flag to indicate DND operation between Java and native app. > > Testing: > mach5 green @dmarkov20 I'd like to confirm this issue was not fixed by [JDK-8261231](https://bugs.openjdk.java.net/browse/JDK-8261231) #2448 ? - PR: https://git.openjdk.java.net/jdk/pull/2825
Re: RFR: 8262446: DragAndDrop hangs on Windows
On Thu, 4 Mar 2021 19:38:34 GMT, Alexey Ivanov wrote: >> The IME functions and the DND operation must be executed on the toolkit >> thread. If the DND operation is in progress, the IME API is invoked via >> SendMessage() call inside InvokeInputMethodFunction() to avoid a hang. The >> flag isInDoDragDropLoop indicates whether the DND takes place or not. The >> flag works properly if the DND is performed between two Java windows. >> However if anything is dragged from native app, (e.g. Windows FileExplorer) >> to Java the flag is NOT set. That’s the root cause of the hang. >> >> Fix: >> Introduce a new flag to indicate DND operation between Java and native app. >> >> Testing: >> mach5 green > > Marked as reviewed by aivanov (Reviewer). Why we cannot reuse the old flag? "isInDoDragDropLoop"? I think the Robot.waitForIdle() will hang if isInDoDragDropLoop is not set to true while dragging something from the native app. - PR: https://git.openjdk.java.net/jdk/pull/2825
Re: RFR: 8262446: DragAndDrop hangs on Windows
On Thu, 4 Mar 2021 10:36:56 GMT, Dmitry Markov wrote: > The IME functions and the DND operation must be executed on the toolkit > thread. If the DND operation is in progress, the IME API is invoked via > SendMessage() call inside InvokeInputMethodFunction() to avoid a hang. The > flag isInDoDragDropLoop indicates whether the DND takes place or not. The > flag works properly if the DND is performed between two Java windows. However > if anything is dragged from native app, (e.g. Windows FileExplorer) to Java > the flag is NOT set. That’s the root cause of the hang. > > Fix: > Introduce a new flag to indicate DND operation between Java and native app. > > Testing: > mach5 green Marked as reviewed by aivanov (Reviewer). - PR: https://git.openjdk.java.net/jdk/pull/2825
RFR: 8262446: DragAndDrop hangs on Windows
The IME functions and the DND operation must be executed on the toolkit thread. If the DND operation is in progress, the IME API is invoked via SendMessage() call inside InvokeInputMethodFunction() to avoid a hang. The flag isInDoDragDropLoop indicates whether the DND takes place or not. The flag works properly if the DND is performed between two Java windows. However if anything is dragged from native app, (e.g. Windows FileExplorer) to Java the flag is NOT set. That’s the root cause of the hang. Fix: Introduce a new flag to indicate DND operation between Java and native app. Testing: mach5 green - Commit messages: - 8262446: DragAndDrop hangs on Windows Changes: https://git.openjdk.java.net/jdk/pull/2825/files Webrev: https://webrevs.openjdk.java.net/?repo=jdk&pr=2825&range=00 Issue: https://bugs.openjdk.java.net/browse/JDK-8262446 Stats: 10 lines in 3 files changed: 9 ins; 0 del; 1 mod Patch: https://git.openjdk.java.net/jdk/pull/2825.diff Fetch: git fetch https://git.openjdk.java.net/jdk pull/2825/head:pull/2825 PR: https://git.openjdk.java.net/jdk/pull/2825