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

Unified Diff: ash/mus/window_manager.cc

Issue 2568303006: aura-mus: Implement Deactivate(). (Closed)
Patch Set: Prune comments and other debugging gunk. Created 3 years, 11 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
Index: ash/mus/window_manager.cc
diff --git a/ash/mus/window_manager.cc b/ash/mus/window_manager.cc
index 5946488013fd18246e613b9e236117fec04072cf..8c815b69a95d8e0c752184dfbc47a1f77005bc8c 100644
--- a/ash/mus/window_manager.cc
+++ b/ash/mus/window_manager.cc
@@ -499,6 +499,17 @@ void WindowManager::OnWmSetClientArea(
non_client_frame_controller->SetClientArea(insets, additional_client_areas);
}
+void WindowManager::OnWmDeactivateWindow(aura::Window* window) {
+ aura::client::ActivationClient* activation_client =
+ static_cast<aura::client::ActivationClient*>(focus_controller_.get());
+ if (activation_client->GetActiveWindow() != window) {
+ DVLOG(1) << "Non-active window requested deactivation.";
+ return;
+ }
+
+ activation_client->DeactivateWindow(window);
+}
+
void WindowManager::OnWindowInitialized(aura::Window* window) {
// This ensures WmWindowAura won't be called before WmWindowMus. This is
// important as if WmWindowAura::Get() is called first, then WmWindowAura

Powered by Google App Engine
This is Rietveld 408576698