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

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

Issue 2875753002: Implement aura::WindowPortMus::CreateCompositorFrameSink() (Closed)
Patch Set: WIP 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 | « no previous file | services/ui/ws/window_tree.cc » ('j') | services/ui/ws/window_tree.cc » ('J')
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);
Fady Samuel 2017/05/18 20:02:01 This breaks right? If the embedder is top most (As
Peng 2017/05/18 20:50:59 I tested it with mushrome, mustash, and mustash +
Fady Samuel 2017/05/18 20:56:22 Do we assign an owner to the temporary reference?
Peng 2017/05/23 18:00:42 Done.
- 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;
+
+ WindowTree* window_tree = GetTreeWithId(window_tree_id);
if (window_tree)
window_tree->ProcessWindowSurfaceChanged(window, surface_info);
}
« no previous file with comments | « no previous file | services/ui/ws/window_tree.cc » ('j') | services/ui/ws/window_tree.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698