Chromium Code Reviews| 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); |
| } |