Index: win8/metro_driver/chrome_app_view_ash.cc |
diff --git a/win8/metro_driver/chrome_app_view_ash.cc b/win8/metro_driver/chrome_app_view_ash.cc |
index 98e52b375f62aa33182906a991d8c84783cd0980..8bcc6dbdab67a56f657ee666f8e0a1b9967d9ba6 100644 |
--- a/win8/metro_driver/chrome_app_view_ash.cc |
+++ b/win8/metro_driver/chrome_app_view_ash.cc |
@@ -1280,18 +1280,23 @@ HRESULT ChromeAppViewAsh::OnCharacterReceived( |
HRESULT ChromeAppViewAsh::OnWindowActivated( |
winui::Core::ICoreWindow* sender, |
winui::Core::IWindowActivatedEventArgs* args) { |
- winui::Core::CoreWindowActivationState state; |
- HRESULT hr = args->get_WindowActivationState(&state); |
- if (FAILED(hr)) |
- return hr; |
+ if (args) { |
+ winui::Core::CoreWindowActivationState state; |
+ HRESULT hr = args->get_WindowActivationState(&state); |
+ if (FAILED(hr)) |
+ return hr; |
- // Treat both full activation (Ash was reopened from the Start Screen or from |
- // any other Metro entry point in Windows) and pointer activation (user |
- // clicked back in Ash after using another app on another monitor) the same. |
- if (state == winui::Core::CoreWindowActivationState_CodeActivated || |
- state == winui::Core::CoreWindowActivationState_PointerActivated) { |
- if (text_service_) |
- text_service_->OnWindowActivated(); |
+ // Treat both full activation (Ash was reopened from the Start Screen or |
+ // from any other Metro entry point in Windows) and pointer activation |
+ // (user clicked back in Ash after using another app on another monitor) |
+ // the same. |
+ if (state == winui::Core::CoreWindowActivationState_CodeActivated || |
+ state == winui::Core::CoreWindowActivationState_PointerActivated) { |
+ if (text_service_) |
+ text_service_->OnWindowActivated(); |
+ ui_channel_->Send(new MetroViewerHostMsg_WindowActivated()); |
+ } |
+ } else { |
cpu_(ooo_6.6-7.5)
2014/09/04 19:13:21
// On windows 7 we need to force a redraw after th
ananta
2014/09/04 19:27:07
Added a comment. We also pass in a bool in the IPC
|
ui_channel_->Send(new MetroViewerHostMsg_WindowActivated()); |
} |
return S_OK; |