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

Unified Diff: win8/metro_driver/chrome_app_view_ash.cc

Issue 27058004: Use WindowActivated message instead of VisibilityChanged message to determine that Ash is the activ… (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 2 months 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 | « ui/metro_viewer/metro_viewer_messages.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 e39118b8501f7b6aa6c7ba22c24dea92e1a8bfa2..08c165a042c1ce0219d56c7effe2b97c859f3437 100644
--- a/win8/metro_driver/chrome_app_view_ash.cc
+++ b/win8/metro_driver/chrome_app_view_ash.cc
@@ -884,8 +884,6 @@ HRESULT ChromeAppViewAsh::OnVisibilityChanged(
HRESULT hr = args->get_Visible(&visible);
if (FAILED(hr))
return hr;
-
- ui_channel_->Send(new MetroViewerHostMsg_VisibilityChanged(!!visible));
return S_OK;
}
@@ -896,6 +894,14 @@ HRESULT ChromeAppViewAsh::OnWindowActivated(
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 screen) the same.
+ if (state == winui::Core::CoreWindowActivationState_CodeActivated ||
+ state == winui::Core::CoreWindowActivationState_PointerActivated) {
+ ui_channel_->Send(new MetroViewerHostMsg_WindowActivated());
+ }
return S_OK;
}
« no previous file with comments | « ui/metro_viewer/metro_viewer_messages.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698