Skip to content
This repository was archived by the owner on Sep 2, 2022. It is now read-only.
/ jdk16u Public archive

Commit ac08d3f

Browse files
committed
8261231: Windows IME was disabled after DnD operation
Backport-of: d6d5d9bf2f1a3343af6cf30a9d06a1f1b5f764ad
1 parent cc3417d commit ac08d3f

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
@@ -3215,10 +3215,12 @@ LRESULT AwtToolkit::InvokeInputMethodFunction(UINT msg, WPARAM wParam, LPARAM lP
32153215
* function once the DND is active; otherwise a hang is possible since DND may wait for
32163216
* the IME completion.
32173217
*/
3218+
CriticalSection::Lock lock(m_inputMethodLock);
32183219
if (isInDoDragDropLoop) {
3219-
return SendMessage(msg, wParam, lParam);
3220+
SendMessage(msg, wParam, lParam);
3221+
::ResetEvent(m_inputMethodWaitEvent);
3222+
return m_inputMethodData;
32203223
} else {
3221-
CriticalSection::Lock lock(m_inputMethodLock);
32223224
if (PostMessage(msg, wParam, lParam)) {
32233225
::WaitForSingleObject(m_inputMethodWaitEvent, INFINITE);
32243226
return m_inputMethodData;

0 commit comments

Comments
 (0)