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

Unified Diff: components/mus/ws/connection_manager.cc

Issue 1648033002: Fix regression when resolving ids (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/mus/ws/connection_manager.cc
diff --git a/components/mus/ws/connection_manager.cc b/components/mus/ws/connection_manager.cc
index b7c22f994242c1619aad9cd86495c3f19e828cf0..4f96647607f20237f1f76f67f6d44aa717775d04 100644
--- a/components/mus/ws/connection_manager.cc
+++ b/components/mus/ws/connection_manager.cc
@@ -539,7 +539,11 @@ ServerWindow* ConnectionManager::FindWindowForSurface(
const ServerWindow* ancestor,
mojom::SurfaceType surface_type,
const ClientWindowId& client_window_id) {
- WindowTreeImpl* window_tree = GetConnection(ancestor->id().connection_id);
+ WindowTreeImpl* window_tree;
+ if (ancestor->id().connection_id == kInvalidConnectionId)
+ window_tree = GetWindowTreeHostByWindow(ancestor)->GetWindowTree();
+ else
+ window_tree = GetConnection(ancestor->id().connection_id);
if (!window_tree)
return nullptr;
if (surface_type == mojom::SurfaceType::DEFAULT) {
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698