Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(3709)

Unified Diff: chrome/browser/autocomplete/autocomplete_edit_view_win.cc

Issue 505026: Use KF_ALTDOWN flag instead of GetKeyState(VK_MENU) (Closed)
Patch Set: Created 11 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/autocomplete/autocomplete_edit_view_win.cc
diff --git a/chrome/browser/autocomplete/autocomplete_edit_view_win.cc b/chrome/browser/autocomplete/autocomplete_edit_view_win.cc
index c00d5f360f59e1a7b2234eae1fbefea50f4c7e6c..7ee0b0f0ebd70a3c2b8ab14b755d8caa2872963c 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());
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698