summaryrefslogtreecommitdiffstats
path: root/win8
diff options
context:
space:
mode:
authorananta@chromium.org <ananta@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2014-02-22 00:17:38 +0000
committerananta@chromium.org <ananta@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2014-02-22 00:17:38 +0000
commit9f684b0470e741505b07e154e985f65ceca65ada (patch)
treeb64985511d3e497ba7c0337803ef6a2daaff74c2 /win8
parent628dc066203e29f18c4f592296cbb028aaff7b0c (diff)
downloadchromium_src-9f684b0470e741505b07e154e985f65ceca65ada.zip
chromium_src-9f684b0470e741505b07e154e985f65ceca65ada.tar.gz
chromium_src-9f684b0470e741505b07e154e985f65ceca65ada.tar.bz2
Don't send the Alt + F4 key combination from the metro viewer process to the Chrome browser
process. The Alt + F4 key combination is intended to shutdown metro. Sending this to the browser causes other code to execute leading to bad things. BUG=344739 R=cpu@chromium.org, cpu Review URL: https://codereview.chromium.org/164913009 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@252701 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'win8')
-rw-r--r--win8/metro_driver/chrome_app_view_ash.cc7
1 files changed, 7 insertions, 0 deletions
diff --git a/win8/metro_driver/chrome_app_view_ash.cc b/win8/metro_driver/chrome_app_view_ash.cc
index 9b7e6b6..af63093 100644
--- a/win8/metro_driver/chrome_app_view_ash.cc
+++ b/win8/metro_driver/chrome_app_view_ash.cc
@@ -1178,6 +1178,13 @@ HRESULT ChromeAppViewAsh::OnAcceleratorKeyDown(
break;
case winui::Core::CoreAcceleratorKeyEventType_SystemKeyDown:
+ // Don't send the Alt + F4 combination to Chrome as this is intended to
+ // shut the metro environment down. Reason we check for Control here is
+ // Windows does not shutdown metro if Ctrl is pressed along with Alt F4.
+ // Other key combinations with Alt F4 shutdown metro.
+ if ((virtual_key == VK_F4) && ((keyboard_flags & ui::EF_ALT_DOWN) &&
+ !(keyboard_flags & ui::EF_CONTROL_DOWN)))
+ return S_OK;
ui_channel_->Send(new MetroViewerHostMsg_KeyDown(virtual_key,
status.RepeatCount,
status.ScanCode,