X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=src%2Fwin8%2Fmetro_driver%2Fchrome_app_view_ash.cc;h=af6309389b38f062a9b07d779ebbcf13656ab348;hb=ff3e2503a20db9193d323c1d19c38c68004dec4a;hp=b8f2241483c8387ffad29ab01cf24d9e24ca2ddb;hpb=7338fba38ba696536d1cc9d389afd716a6ab2fe6;p=platform%2Fframework%2Fweb%2Fcrosswalk.git diff --git a/src/win8/metro_driver/chrome_app_view_ash.cc b/src/win8/metro_driver/chrome_app_view_ash.cc index b8f2241..af63093 100644 --- a/src/win8/metro_driver/chrome_app_view_ash.cc +++ b/src/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, @@ -1288,11 +1295,7 @@ HRESULT ChromeAppViewAsh::HandleProtocolRequest( HRESULT ChromeAppViewAsh::OnEdgeGestureCompleted( winui::Input::IEdgeGesture* gesture, winui::Input::IEdgeGestureEventArgs* args) { - // Swipe from edge gesture (and win+z) is equivalent to pressing F11. - // TODO(cpu): Make this cleaner for m33. - ui_channel_->Send(new MetroViewerHostMsg_KeyDown(VK_F11, 1, 0, 0)); - ::Sleep(15); - ui_channel_->Send(new MetroViewerHostMsg_KeyUp(VK_F11, 1, 0, 0)); + ui_channel_->Send(new MetroViewerHostMsg_EdgeGesture()); return S_OK; }