JRE-365 [Windows] When I enter Chinese character, the candidate box appears in the lower right corner
including one more fix from JDK8u OpenJDK repo, which hopefully will finally resolve JRE-379
Related commits in OpenJDK repo:
http://hg.openjdk.java.net/jdk8u/jdk8u/jdk/rev/95fd1952637b
http://hg.openjdk.java.net/jdk8u/jdk8u/jdk/rev/0a7519d7e055
diff --git a/src/windows/native/sun/windows/awt_Component.cpp b/src/windows/native/sun/windows/awt_Component.cpp
index 05524c7..46b6611 100644
--- a/src/windows/native/sun/windows/awt_Component.cpp
+++ b/src/windows/native/sun/windows/awt_Component.cpp
@@ -3910,10 +3910,12 @@
if (!m_useNativeCompWindow) {
if (subMsg == IMN_OPENCANDIDATE) {
m_bitsCandType = subMsg;
- } else if (subMsg != IMN_SETCANDIDATEPOS) {
+ InquireCandidatePosition();
+ } else if (subMsg == IMN_OPENSTATUSWINDOW ||
+ subMsg == WM_IME_STARTCOMPOSITION) {
m_bitsCandType = 0;
+ InquireCandidatePosition();
}
- InquireCandidatePosition();
return mrConsume;
}
return mrDoDefault;
@@ -4173,14 +4175,14 @@
return (HWND)NULL;
}
-/* Call DefWindowProc for the focus proxy, if any */
+/* Redirects message to the focus proxy, if any */
void AwtComponent::CallProxyDefWindowProc(UINT message, WPARAM wParam,
LPARAM lParam, LRESULT &retVal, MsgRouting &mr)
{
if (mr != mrConsume) {
HWND proxy = GetProxyFocusOwner();
if (proxy != NULL && ::IsWindowEnabled(proxy)) {
- retVal = ComCtl32Util::GetInstance().DefWindowProc(NULL, proxy, message, wParam, lParam);
+ retVal = ::DefWindowProc(proxy, message, wParam, lParam);
mr = mrConsume;
}
}