7071248: IME composition window does not disappear when file dialog is closed : Japanese WinXP
authordenis
Mon, 05 Sep 2011 18:54:49 +0400
changeset 10411 f63e5bab1676
parent 10410 ebae41687d0b
child 10412 0c262c47967c
7071248: IME composition window does not disappear when file dialog is closed : Japanese WinXP Reviewed-by: naoto, art
jdk/src/windows/native/sun/windows/awt_FileDialog.cpp
--- a/jdk/src/windows/native/sun/windows/awt_FileDialog.cpp	Thu Sep 01 17:29:37 2011 +0400
+++ b/jdk/src/windows/native/sun/windows/awt_FileDialog.cpp	Mon Sep 05 18:54:49 2011 +0400
@@ -153,6 +153,11 @@
             break;
         }
         case WM_DESTROY: {
+            HIMC hIMC = ::ImmGetContext(hdlg);
+            if (hIMC != NULL) {
+                ::ImmNotifyIME(hIMC, NI_COMPOSITIONSTR, CPS_CANCEL, 0);
+            }
+
             WNDPROC lpfnWndProc = (WNDPROC)(::GetProp(parent, NativeDialogWndProcProp));
             ComCtl32Util::GetInstance().UnsubclassHWND(parent,
                                                        FileDialogWndProc,