Skip to content
This repository was archived by the owner on Feb 2, 2023. It is now read-only.
/ jdk15u-dev Public archive

Commit 0f9626c

Browse files
author
Yuri Nesterenko
committed
8261231: Windows IME was disabled after DnD operation
Backport-of: d6d5d9bf2f1a3343af6cf30a9d06a1f1b5f764ad
1 parent 5bfa154 commit 0f9626c

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

src/java.desktop/windows/native/libawt/windows/awt_Toolkit.cpp

+4-2
Original file line numberDiff line numberDiff line change
@@ -3216,10 +3216,12 @@ LRESULT AwtToolkit::InvokeInputMethodFunction(UINT msg, WPARAM wParam, LPARAM lP
32163216
* function once the DND is active; otherwise a hang is possible since DND may wait for
32173217
* the IME completion.
32183218
*/
3219+
CriticalSection::Lock lock(m_inputMethodLock);
32193220
if (isInDoDragDropLoop) {
3220-
return SendMessage(msg, wParam, lParam);
3221+
SendMessage(msg, wParam, lParam);
3222+
::ResetEvent(m_inputMethodWaitEvent);
3223+
return m_inputMethodData;
32213224
} else {
3222-
CriticalSection::Lock lock(m_inputMethodLock);
32233225
if (PostMessage(msg, wParam, lParam)) {
32243226
::WaitForSingleObject(m_inputMethodWaitEvent, INFINITE);
32253227
return m_inputMethodData;

0 commit comments

Comments
 (0)