| Index: services/ui/ws/window_server.cc
|
| diff --git a/services/ui/ws/window_server.cc b/services/ui/ws/window_server.cc
|
| index b41585f4558de45e336d873b6eb04cab355be8c7..c4758a510b24ec0e3536e4e075a8c011f7ce3970 100644
|
| --- a/services/ui/ws/window_server.cc
|
| +++ b/services/ui/ws/window_server.cc
|
| @@ -787,10 +787,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.
|
|
|