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

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

Issue 2875753002: Implement aura::WindowPortMus::CreateCompositorFrameSink() (Closed)
Patch Set: Address review issues 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
« no previous file with comments | « components/exo/surface.cc ('k') | services/ui/ws/window_tree.cc » ('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 67b312547b4c89e727ca8c52d56a89c92c95000e..81b0ac39d8cdaee9b7c02fcd3843dcc8f4786a83 100644
--- a/services/ui/ws/window_server.cc
+++ b/services/ui/ws/window_server.cc
@@ -856,10 +856,15 @@ void WindowServer::OnSurfaceCreated(const cc::SurfaceInfo& surface_info) {
HandleTemporaryReferenceForNewSurface(surface_info.id(), window);
- if (!window->parent())
- return;
-
- WindowTree* window_tree = GetTreeWithId(window->parent()->id().client_id);
+ ClientSpecificId window_tree_id = window->id().client_id;
+ // If the window has a parent, we should use the parent's tree, because the
+ // window could be an embedded window, and the window will be in both
+ // the embedder's tree and embeddee's tree, in this case we shold notify
+ // the embedder's tree about the surface change.
+ if (window->parent())
+ window_tree_id = window->parent()->id().client_id;
Fady Samuel 2017/05/25 20:58:03 So we agreed to undo this change?
Peng 2017/05/25 23:10:39 The origin code will not send the new surface id t
Peng 2017/05/26 13:58:25 I just realized, we should never use the parent wi
+
+ WindowTree* window_tree = GetTreeWithId(window_tree_id);
if (window_tree)
window_tree->ProcessWindowSurfaceChanged(window, surface_info);
}
« no previous file with comments | « components/exo/surface.cc ('k') | services/ui/ws/window_tree.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698