7045354: Korean IME's Hanja candidate window is not displayed on IMFDemo
Reviewed-by: art, ant
--- a/jdk/src/windows/native/sun/windows/awt_Component.cpp Sat May 28 12:56:52 2011 +0400
+++ b/jdk/src/windows/native/sun/windows/awt_Component.cpp Mon May 30 13:25:02 2011 +0400
@@ -3715,7 +3715,10 @@
SetCandidateWindow(iCandType, x-rc.left, y-rc.top);
}
if (m_bitsCandType != 0) {
- ::DefWindowProc(GetHWnd(), WM_IME_NOTIFY, IMN_OPENCANDIDATE, m_bitsCandType);
+ HWND proxy = GetProxyFocusOwner();
+ // REMIND: is there any chance GetProxyFocusOwner() returns NULL here?
+ ::DefWindowProc((proxy != NULL) ? proxy : GetHWnd(),
+ WM_IME_NOTIFY, IMN_OPENCANDIDATE, m_bitsCandType);
}
}