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

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

Issue 2346253004: Makes display roots be destroyed by client (Closed)
Patch Set: cleanup Created 4 years, 3 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 | « services/ui/ws/window_manager_state.cc ('k') | services/ui/ws/window_tree.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: services/ui/ws/window_server.cc
diff --git a/services/ui/ws/window_server.cc b/services/ui/ws/window_server.cc
index 7242370e5a26b58c139d35db3ae32bdd60907826..3274da7cfa4d750f8bfea8203be64d0c91cd96e0 100644
--- a/services/ui/ws/window_server.cc
+++ b/services/ui/ws/window_server.cc
@@ -206,6 +206,16 @@ ServerWindow* WindowServer::GetWindow(const WindowId& id) {
if (window)
return window;
}
+ // WindowManagerDisplayRoots are destroyed by the client and not held by
+ // the Display.
+ for (auto& pair : tree_map_) {
+ if (pair.second->window_manager_state()) {
+ ServerWindow* window =
+ pair.second->window_manager_state()->GetOrphanedRootWithId(id);
+ if (window)
+ return window;
+ }
+ }
}
WindowTree* tree = GetTreeWithId(id.client_id);
return tree ? tree->GetWindow(id) : nullptr;
« no previous file with comments | « services/ui/ws/window_manager_state.cc ('k') | services/ui/ws/window_tree.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698