7045354: Korean IME's Hanja candidate window is not displayed on IMFDemo
authordcherepanov
Mon, 30 May 2011 13:25:02 +0400
changeset 9765 ae2e96c145ee
parent 9764 2c32301ba9b8
child 9766 bf57566e576d
7045354: Korean IME's Hanja candidate window is not displayed on IMFDemo Reviewed-by: art, ant
jdk/src/windows/native/sun/windows/awt_Component.cpp
--- 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);
     }
 }