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..255e49c4ceae61b4110d2adcd9619ee175f73b8c 100644 |
| --- a/services/ui/ws/window_server.cc |
| +++ b/services/ui/ws/window_server.cc |
| @@ -856,10 +856,9 @@ 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); |
| + // We always use the client_id of window's id (even for embedded window), |
|
sky
2017/05/26 23:14:18
How about, 'We always use the owner of the window.
Peng
2017/05/30 19:46:27
Done.
|
| + // because an embedded window's id is allocated by the parent's window tree. |
| + WindowTree* window_tree = GetTreeWithId(window->id().client_id); |
| if (window_tree) |
| window_tree->ProcessWindowSurfaceChanged(window, surface_info); |
| } |