mirror of
https://github.com/openjdk/jdk.git
synced 2026-05-18 17:37:53 +00:00
7026055: Regression : Cannot use IME on JComboBox Japanese
Reviewed-by: art, ant, naoto
This commit is contained in:
parent
2ab6e13a21
commit
202b18b4f5
@ -549,8 +549,6 @@ AwtComponent::CreateHWnd(JNIEnv *env, LPCWSTR title,
|
||||
|
||||
m_hwnd = hwnd;
|
||||
|
||||
ImmAssociateContext(NULL);
|
||||
|
||||
SetDrawState((jint)JAWT_LOCK_SURFACE_CHANGED |
|
||||
(jint)JAWT_LOCK_BOUNDS_CHANGED |
|
||||
(jint)JAWT_LOCK_CLIP_CHANGED);
|
||||
@ -2022,25 +2020,6 @@ MsgRouting AwtComponent::WmExitMenuLoop(BOOL isTrackPopupMenu)
|
||||
|
||||
MsgRouting AwtComponent::WmShowWindow(BOOL show, UINT status)
|
||||
{
|
||||
// NULL-InputContext is associated to all window just after they created.
|
||||
// ( see CreateHWnd() )
|
||||
// But to TextField and TextArea on Win95, valid InputContext is associated
|
||||
// by system after that. This is not happen on NT4.0
|
||||
// For workaround, force context to NULL here.
|
||||
|
||||
// Fix for 4730228
|
||||
// Check if we already have Java-associated input method
|
||||
HIMC context = 0;
|
||||
if (m_InputMethod != NULL) {
|
||||
// If so get the appropriate context from it and use it instead of empty context
|
||||
JNIEnv *env = (JNIEnv *)JNU_GetEnv(jvm, JNI_VERSION_1_2);
|
||||
context = (HIMC)(UINT_PTR)(JNU_GetFieldByName(env, NULL, m_InputMethod, "context", "I").i);
|
||||
}
|
||||
|
||||
if (ImmGetContext() != 0 && ImmGetContext() != context) {
|
||||
ImmAssociateContext(context);
|
||||
}
|
||||
|
||||
return mrDoDefault;
|
||||
}
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user