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); |
| - 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); |
| } |