Index: ash/wm/overview/scoped_transform_overview_window.cc |
diff --git a/ash/wm/overview/scoped_transform_overview_window.cc b/ash/wm/overview/scoped_transform_overview_window.cc |
index d596ccce4a9ba282aa84e3db1342af5eac856088..7c5a7a8948a7e6bd5a970df5ae464779953a8aa7 100644 |
--- a/ash/wm/overview/scoped_transform_overview_window.cc |
+++ b/ash/wm/overview/scoped_transform_overview_window.cc |
@@ -184,8 +184,11 @@ ScopedTransformOverviewWindow::~ScopedTransformOverviewWindow() { |
// Setting opacity 0 and visible false ensures that the property change |
// to SHOW_STATE_MINIMIZED will not animate the window from its original |
// bounds to the minimized position. |
- window_->layer()->SetOpacity(0); |
+ // Hiding the window needs to be done before the target opacity is 0, |
+ // otherwise the layer's visibility will not be updated |
+ // (See VisibilityController::UpdateLayerVisibility). |
window_->Hide(); |
+ window_->layer()->SetOpacity(0); |
window_->SetProperty(aura::client::kShowStateKey, |
ui::SHOW_STATE_MINIMIZED); |
} |