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

Unified Diff: ash/wm/window_util.cc

Issue 2870253006: Fix WindowTreeHostManager::GetPrimaryRootWindow. (Closed)
Patch Set: Created 3 years, 7 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
« ash/shell.cc ('K') | « ash/shell.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/wm/window_util.cc
diff --git a/ash/wm/window_util.cc b/ash/wm/window_util.cc
index 0f2ae9044203850c0eb3f90c5c03f0f888dc1e48..493933e9ac3b7b015b74b5bfa0af29adae4af09b 100644
--- a/ash/wm/window_util.cc
+++ b/ash/wm/window_util.cc
@@ -64,8 +64,9 @@ bool IsActiveWindow(aura::Window* window) {
}
aura::Window* GetActiveWindow() {
varkha 2017/05/10 22:23:59 nit: Maybe a comment about when primary root windo
- return aura::client::GetActivationClient(Shell::GetPrimaryRootWindow())
- ->GetActiveWindow();
+ auto* client =
+ aura::client::GetActivationClient(Shell::GetPrimaryRootWindow());
+ return client ? client->GetActiveWindow() : nullptr;
}
aura::Window* GetActivatableWindow(aura::Window* window) {
« ash/shell.cc ('K') | « ash/shell.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698