| Index: services/ui/ws/window_server.cc
|
| diff --git a/services/ui/ws/window_server.cc b/services/ui/ws/window_server.cc
|
| index d012b886dc2f0bc50ecc2246398ff6bcdc5aef36..2a5278215fe494f197705aeea8c52e8fb298a2b5 100644
|
| --- a/services/ui/ws/window_server.cc
|
| +++ b/services/ui/ws/window_server.cc
|
| @@ -826,7 +826,13 @@ void WindowServer::OnSurfaceCreated(const cc::SurfaceInfo& surface_info) {
|
| window_paint_callback_.Run(window);
|
|
|
| auto* display = display_manager_->GetDisplayContaining(window);
|
| - if (display && window == display->GetActiveRootWindow()) {
|
| + WindowManagerDisplayRoot* display_root =
|
| + display ? display->GetActiveWindowManagerDisplayRoot() : nullptr;
|
| + if (display_root && (window == display_root->root() ||
|
| + (!display_root->window_manager_state()
|
| + ->window_tree()
|
| + ->automatically_create_display_roots() &&
|
| + window->parent() == display_root->root()))) {
|
| // A new surface for a WindowManager root has been created. This is a
|
| // special case because ServerWindows created by the WindowServer are not
|
| // part of a WindowTree. Send the SurfaceId directly to FrameGenerator and
|
|
|