| Index: services/ui/ws/display.cc
|
| diff --git a/services/ui/ws/display.cc b/services/ui/ws/display.cc
|
| index 68e8657c2bf4f484cbd97736792965bf2f3bbdc3..fdf2ddb63766a636d79684d26678063839f8bb13 100644
|
| --- a/services/ui/ws/display.cc
|
| +++ b/services/ui/ws/display.cc
|
| @@ -58,6 +58,9 @@ Display::~Display() {
|
| ->second->window_manager_state()
|
| ->window_tree());
|
| }
|
| +
|
| + if (platform_display_)
|
| + window_server_->RemovePlatformDisplay(platform_display_);
|
| }
|
|
|
| void Display::Init(const PlatformDisplayInitParams& init_params,
|
| @@ -69,8 +72,11 @@ void Display::Init(const PlatformDisplayInitParams& init_params,
|
| PlatformDisplayInitParams params_copy = init_params;
|
| params_copy.root_window = root_.get();
|
|
|
| - platform_display_ = PlatformDisplay::Create(params_copy);
|
| + std::unique_ptr<PlatformDisplay> platform_display =
|
| + PlatformDisplay::Create(params_copy);
|
| + platform_display_ = platform_display.get();
|
| platform_display_->Init(this);
|
| + window_server_->AddPlatformDisplay(std::move(platform_display));
|
| }
|
|
|
| int64_t Display::GetId() const {
|
|
|