From 5fb1e3aedf28059eb8bb51aa1b530f24be2f18ef Mon Sep 17 00:00:00 2001 From: ananta Date: Tue, 7 Oct 2014 14:26:27 -0700 Subject: Don't send the EF_ALT_DOWN modifier along with the IPC message for the Alt or F10 key from the viewer process. The accelerator for VKEY_MENU is registered without modifiers in Chrome for historical reasons. Not sending the EF_ALT_DOWN modifier ensures that the accelerator is processed correctly. BUG=420797 Review URL: https://codereview.chromium.org/632843002 Cr-Commit-Position: refs/heads/master@{#298576} --- win8/metro_driver/chrome_app_view_ash.cc | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/win8/metro_driver/chrome_app_view_ash.cc b/win8/metro_driver/chrome_app_view_ash.cc index dcc7e0f..0560e73 100644 --- a/win8/metro_driver/chrome_app_view_ash.cc +++ b/win8/metro_driver/chrome_app_view_ash.cc @@ -1236,6 +1236,13 @@ HRESULT ChromeAppViewAsh::OnAcceleratorKeyDown( if ((virtual_key == VK_F4) && ((keyboard_flags & ui::EF_ALT_DOWN) && !(keyboard_flags & ui::EF_CONTROL_DOWN))) return S_OK; + // Don't send the EF_ALT_DOWN modifier along with the IPC message for + // the Alt or F10 key. The accelerator for VKEY_MENU is registered + // without modifiers in Chrome for historical reasons. Not sending the + // EF_ALT_DOWN modifier ensures that the accelerator is processed + // correctly. + if (virtual_key == winsys::VirtualKey_Menu) + keyboard_flags &= ~ui::EF_ALT_DOWN; ui_channel_->Send(new MetroViewerHostMsg_KeyDown(virtual_key, status.RepeatCount, status.ScanCode, -- cgit v1.1