| Index: ash/common/wm/overview/window_selector_item.cc
|
| diff --git a/ash/common/wm/overview/window_selector_item.cc b/ash/common/wm/overview/window_selector_item.cc
|
| index 9eada970ce3163e80b5114ed1d10b4d0cc42820a..c639777d50293e9fa11ae3404357d01814920adf 100644
|
| --- a/ash/common/wm/overview/window_selector_item.cc
|
| +++ b/ash/common/wm/overview/window_selector_item.cc
|
| @@ -427,8 +427,15 @@ void WindowSelectorItem::Shutdown() {
|
| // gradual upon exiting the overview mode.
|
| WmWindow* label_window =
|
| WmLookup::Get()->GetWindowForWidget(window_label_.get());
|
| - label_window->GetParent()->StackChildAbove(label_window,
|
| - transform_window_.window());
|
| +
|
| + // |label_window| was originally created in the same container as the
|
| + // |transform_window_| but when closing overview the |transform_window_|
|
| + // could have been reparented if a drag was active. Only change stacking
|
| + // if the windows still belong to the same container.
|
| + if (label_window->GetParent() == transform_window_.window()->GetParent()) {
|
| + label_window->GetParent()->StackChildAbove(label_window,
|
| + transform_window_.window());
|
| + }
|
| }
|
| if (background_view_) {
|
| background_view_->OnItemRestored();
|
|
|