| Index: services/ui/ws/window_server.cc
|
| diff --git a/services/ui/ws/window_server.cc b/services/ui/ws/window_server.cc
|
| index 0bf97ea295c503d7a332a5bc7456b6538e530a13..8ab1768ffe80896a3a36af3cade498e91a01662a 100644
|
| --- a/services/ui/ws/window_server.cc
|
| +++ b/services/ui/ws/window_server.cc
|
| @@ -783,10 +783,11 @@ void WindowServer::OnSurfaceCreated(const cc::SurfaceInfo& surface_info) {
|
|
|
| // FrameGenerator will add an appropriate reference for the new surface.
|
| DCHECK(display_manager_->GetDisplayContaining(window));
|
| - display_manager_->GetDisplayContaining(window)
|
| - ->platform_display()
|
| - ->GetFrameGenerator()
|
| - ->OnSurfaceCreated(surface_info.id(), window);
|
| + auto display = display_manager_->GetDisplayContaining(window);
|
| + if (window == display->GetActiveRootWindow()) {
|
| + display->platform_display()->GetFrameGenerator()->OnSurfaceCreated(
|
| + surface_info);
|
| + }
|
|
|
| // This is only used for testing to observe that a window has a
|
| // CompositorFrame.
|
|
|