| Index: athena/wm/split_view_controller.cc
|
| diff --git a/athena/wm/split_view_controller.cc b/athena/wm/split_view_controller.cc
|
| index 1d61ba7d957e77f938fea6d216563401875f2e1b..82167232d8ce7b19707e3da1de73d35263db510e 100644
|
| --- a/athena/wm/split_view_controller.cc
|
| +++ b/athena/wm/split_view_controller.cc
|
| @@ -65,14 +65,9 @@ void SplitViewController::ActivateSplitMode(aura::Window* left,
|
| aura::Window::Windows windows = window_list_provider_->GetWindowList();
|
| aura::Window::Windows::reverse_iterator iter = windows.rbegin();
|
| if (state_ == ACTIVE) {
|
| - if (left_window_ == right)
|
| - left_window_ = left;
|
| - if (right_window_ == left)
|
| - right_window_ = right;
|
| -
|
| - if (!left)
|
| + if (!left && left_window_ != right)
|
| left = left_window_;
|
| - if (!right)
|
| + if (!right && right_window_ != left)
|
| right = right_window_;
|
| }
|
|
|
| @@ -94,6 +89,12 @@ void SplitViewController::ActivateSplitMode(aura::Window* left,
|
| }
|
| }
|
|
|
| + to_hide_.clear();
|
| + if (left_window_ && left_window_ != left && left_window_ != right)
|
| + to_hide_.push_back(left_window_);
|
| + if (right_window_ && right_window_ != left && right_window_ != right)
|
| + to_hide_.push_back(right_window_);
|
| +
|
| SetState(ACTIVE);
|
| right_window_ = right;
|
| left_window_ = left;
|
| @@ -229,6 +230,10 @@ void SplitViewController::OnAnimationCompleted() {
|
| return;
|
| UpdateLayout(false);
|
|
|
| + for (size_t i = 0; i < to_hide_.size(); ++i)
|
| + to_hide_[i]->Hide();
|
| + to_hide_.clear();
|
| +
|
| if (state_ == INACTIVE) {
|
| left_window_ = NULL;
|
| right_window_ = NULL;
|
|
|