diff options
author | hbono@chromium.org <hbono@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-04-07 09:32:45 +0000 |
---|---|---|
committer | hbono@chromium.org <hbono@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-04-07 09:32:45 +0000 |
commit | 2fe25aac3d317086338a761e3b040cbcffc3a873 (patch) | |
tree | 657ffe39dc23c04bb498c73924fe5bea9525ee3b /chrome/browser | |
parent | d6ee9e14d95013491f7f997644ff1daa80f0cbd7 (diff) | |
download | chromium_src-2fe25aac3d317086338a761e3b040cbcffc3a873.zip chromium_src-2fe25aac3d317086338a761e3b040cbcffc3a873.tar.gz chromium_src-2fe25aac3d317086338a761e3b040cbcffc3a873.tar.bz2 |
A quick fix for Issue 9596.
This issue is caused by my bonehead mistake in r4300: I misunderstand the behavior of Vista when we call the SetWindowsText() function. It actually cancels an ongoing composition. So, changing this behavior caused this regression.
To fix this issue, this change cancels an ongoing composition instead of completing it. As far as I tested on my XP PC, this fix works also on XP.
BUG=9596
Review URL: http://codereview.chromium.org/60084
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@13241 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser')
-rw-r--r-- | chrome/browser/autocomplete/autocomplete_edit_view_win.cc | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/chrome/browser/autocomplete/autocomplete_edit_view_win.cc b/chrome/browser/autocomplete/autocomplete_edit_view_win.cc index c2ed753..fa3ff2f 100644 --- a/chrome/browser/autocomplete/autocomplete_edit_view_win.cc +++ b/chrome/browser/autocomplete/autocomplete_edit_view_win.cc @@ -648,14 +648,14 @@ void AutocompleteEditViewWin::SetWindowTextAndCaretPos(const std::wstring& text, size_t caret_pos) { HIMC imm_context = ImmGetContext(m_hWnd); if (imm_context) { - // In Windows Vista, SetWindowText() automatically completes any ongoing + // In Windows Vista, SetWindowText() automatically cancels any ongoing // IME composition, and updates the text of the underlying edit control. // In Windows XP, however, SetWindowText() gets applied to the IME // composition string if it exists, and doesn't update the underlying edit - // control. To avoid this, we force the IME to complete any outstanding + // control. To avoid this, we force the IME to cancel any outstanding // compositions here. This is harmless in Vista and in cases where the IME // isn't composing. - ImmNotifyIME(imm_context, NI_COMPOSITIONSTR, CPS_COMPLETE, 0); + ImmNotifyIME(imm_context, NI_COMPOSITIONSTR, CPS_CANCEL, 0); ImmReleaseContext(m_hWnd, imm_context); } |