Commit 14bc66f8 authored by reveman's avatar reveman Committed by Commit bot

exo: Close widget at the top of ShellSurface dtor.

Allows widget close animations to use the scale assigned
to shell surface at the time it is destroyed.

BUG=628932, b/29082277

Review-Url: https://codereview.chromium.org/2157863002
Cr-Commit-Position: refs/heads/master@{#406044}
parent 7c6709e2
......@@ -236,15 +236,6 @@ ShellSurface::ShellSurface(Surface* surface)
ShellSurface::~ShellSurface() {
DCHECK(!scoped_configure_);
ash::Shell::GetInstance()->activation_client()->RemoveObserver(this);
if (surface_) {
if (scale_ != 1.0)
surface_->window()->SetTransform(gfx::Transform());
surface_->SetSurfaceDelegate(nullptr);
surface_->RemoveSurfaceObserver(this);
}
if (parent_)
parent_->RemoveObserver(this);
if (resizer_)
EndDrag(false /* revert */);
if (widget_) {
......@@ -254,6 +245,15 @@ ShellSurface::~ShellSurface() {
widget_->Hide();
widget_->CloseNow();
}
ash::Shell::GetInstance()->activation_client()->RemoveObserver(this);
if (parent_)
parent_->RemoveObserver(this);
if (surface_) {
if (scale_ != 1.0)
surface_->window()->SetTransform(gfx::Transform());
surface_->SetSurfaceDelegate(nullptr);
surface_->RemoveSurfaceObserver(this);
}
}
void ShellSurface::AcknowledgeConfigure(uint32_t serial) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment