summaryrefslogtreecommitdiffstats
path: root/chrome
diff options
context:
space:
mode:
authorxiyuan@chromium.org <xiyuan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-12-17 18:49:56 +0000
committerxiyuan@chromium.org <xiyuan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-12-17 18:49:56 +0000
commit501ebf0409b21006e224116a324f18ad94edc725 (patch)
treee815af603baea78ddbc480ecf1d27c1ecc230b76 /chrome
parent2c05562d4c61d066139b0812c85ecbdca9f5b563 (diff)
downloadchromium_src-501ebf0409b21006e224116a324f18ad94edc725.zip
chromium_src-501ebf0409b21006e224116a324f18ad94edc725.tar.gz
chromium_src-501ebf0409b21006e224116a324f18ad94edc725.tar.bz2
Use KF_ALTDOWN flag instead of GetKeyState(VK_MENU)
KF_ALTDOWN is more accurate than GetKeyState(VK_MENU). When usre presses RightShift+RightAlt, the fake VK_CONTROL generated carries KF_ALTDOWN in its flags but GetKeyState(VK_MENU) is clear. BUG=30244 TEST=Verify RightAlt+RightShift does not change to RTL and issue 24888 does not regress. However, RightShift+RightAlt still changes RTL as this is the behavior of richedit. Review URL: http://codereview.chromium.org/505026 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@34850 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome')
-rw-r--r--chrome/browser/autocomplete/autocomplete_edit_view_win.cc2
1 files changed, 1 insertions, 1 deletions
diff --git a/chrome/browser/autocomplete/autocomplete_edit_view_win.cc b/chrome/browser/autocomplete/autocomplete_edit_view_win.cc
index c00d5f3..7ee0b0f 100644
--- a/chrome/browser/autocomplete/autocomplete_edit_view_win.cc
+++ b/chrome/browser/autocomplete/autocomplete_edit_view_win.cc
@@ -1319,7 +1319,7 @@ void AutocompleteEditViewWin::OnKeyUp(TCHAR key,
// To work around this, if the user hits ctrl+shift, we pass it to
// DefWindowProc() while the edit is empty, which toggles the default reading
// order; then we restore the user's input.
- if ((GetKeyState(VK_MENU) == 0) &&
+ if (!(flags & KF_ALTDOWN) &&
(((key == VK_CONTROL) && (GetKeyState(VK_SHIFT) < 0)) ||
((key == VK_SHIFT) && (GetKeyState(VK_CONTROL) < 0)))) {
ScopedFreeze freeze(this, GetTextObjectModel());