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

Unified Diff: services/ui/ws/window_manager_state.cc

Issue 2277563002: Wires up immersive mode for chrome and mash (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix crash Created 4 years, 4 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: services/ui/ws/window_manager_state.cc
diff --git a/services/ui/ws/window_manager_state.cc b/services/ui/ws/window_manager_state.cc
index 224207202adc95319a720e7aab3b604d6d27c146..3738a6b61c158fb696cf0bfc3d5d7b6fc949b8fc 100644
--- a/services/ui/ws/window_manager_state.cc
+++ b/services/ui/ws/window_manager_state.cc
@@ -507,15 +507,15 @@ ClientSpecificId WindowManagerState::GetEventTargetClientId(
// the window.
WindowTree* tree = nullptr;
if (in_nonclient_area) {
- tree = window_server()->GetTreeWithId(window->id().client_id);
+ // Events in the non-client area always go to the window manager.
+ tree = window_tree_;
} else {
// If the window is an embed root, forward to the embedded window.
tree = window_server()->GetTreeWithRoot(window);
if (!tree)
tree = window_server()->GetTreeWithId(window->id().client_id);
- }
+ DCHECK(tree);
- if (tree) {
const ServerWindow* embed_root =
tree->HasRoot(window) ? window : GetEmbedRoot(window);
while (tree && tree->embedder_intercepts_events()) {
@@ -523,11 +523,7 @@ ClientSpecificId WindowManagerState::GetEventTargetClientId(
tree = window_server()->GetTreeWithId(embed_root->id().client_id);
embed_root = GetEmbedRoot(embed_root);
}
- }
-
- if (!tree) {
- DCHECK(in_nonclient_area);
- tree = window_tree_;
+ DCHECK(tree);
}
return tree->id();
}

Powered by Google App Engine
This is Rietveld 408576698