Skip to content

Commit d6d5d9b

Browse files
committed
8261231: Windows IME was disabled after DnD operation
Reviewed-by: kizune, serb
1 parent 29a428f commit d6d5d9b

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)