Index: athena/wm/split_view_controller.cc |
diff --git a/athena/wm/split_view_controller.cc b/athena/wm/split_view_controller.cc |
index 85db209536916f46ec72f8d59b586abf056f9e4e..f951b868846e18f2216c3486220cf067d7a7007e 100644 |
--- a/athena/wm/split_view_controller.cc |
+++ b/athena/wm/split_view_controller.cc |
@@ -62,6 +62,9 @@ bool SplitViewController::IsSplitViewModeActive() const { |
void SplitViewController::ActivateSplitMode(aura::Window* left, |
aura::Window* right) { |
+ DCHECK((left && wm::IsActiveWindow(left)) || |
+ (right && wm::IsActiveWindow(right))); |
+ |
sadrul
2014/09/09 14:27:28
We allow both to be NULL.
|
aura::Window::Windows windows = window_list_provider_->GetWindowList(); |
aura::Window::Windows::reverse_iterator iter = windows.rbegin(); |
if (state_ == ACTIVE) { |
@@ -95,14 +98,8 @@ void SplitViewController::ActivateSplitMode(aura::Window* left, |
} |
SetState(ACTIVE); |
- if (right_window_ != right) { |
- right_window_ = right; |
- container_->StackChildAtTop(right_window_); |
- } |
- if (left_window_ != left) { |
- left_window_ = left; |
- container_->StackChildAtTop(left_window_); |
- } |
+ right_window_ = right; |
+ left_window_ = left; |
UpdateLayout(true); |
} |
@@ -122,7 +119,6 @@ void SplitViewController::ReplaceWindow(aura::Window* window, |
left_window_ = replace_with; |
else |
right_window_ = replace_with; |
- wm::ActivateWindow(replace_with); |
UpdateLayout(false); |
window->SetTransform(gfx::Transform()); |
window->Hide(); |
@@ -175,6 +171,12 @@ void SplitViewController::UpdateLayout(bool animate) { |
left_window_->Show(); |
right_window_->Show(); |
+ DCHECK(wm::IsActiveWindow(left_window_) || wm::IsActiveWindow(right_window_)); |
+ if (wm::IsActiveWindow(left_window_)) |
+ container_->StackChildBelow(right_window_, left_window_); |
+ else |
+ container_->StackChildBelow(left_window_, right_window_); |
sadrul
2014/09/09 14:27:27
Can the z-ordering issue described in the bug be f
pkotwicz
2014/09/09 17:06:28
The remainder of the change is to ensure that eith
sadrul
2014/09/11 05:45:48
We are still activating windows from various place
|
+ |
if (state_ == ACTIVE) { |
if (animate) { |
gfx::Transform left_transform = GetTargetTransformForBoundsAnimation( |