diff options
-rw-r--r-- | ash/wm/window_animations.cc | 7 | ||||
-rw-r--r-- | ash/wm/window_cycle_list.cc | 8 |
2 files changed, 8 insertions, 7 deletions
diff --git a/ash/wm/window_animations.cc b/ash/wm/window_animations.cc index c10afde..dd23ec5 100644 --- a/ash/wm/window_animations.cc +++ b/ash/wm/window_animations.cc @@ -292,9 +292,14 @@ ui::Transform BuildWorkspaceSwitchTransform(aura::Window* window) { void AnimateShowWindow_Workspace(aura::Window* window) { ui::Transform transform(BuildWorkspaceSwitchTransform(window)); - window->layer()->SetVisible(true); + // When we call SetOpacity here, if a hide sequence is already running, + // the default animation preemption strategy fast forwards the hide sequence + // to completion and notify the WorkspaceHidingWindowAnimationObserver to + // set the layer to be invisible. We should call SetVisible after SetOpacity + // to ensure our layer is visible again. window->layer()->SetOpacity(0.0f); window->layer()->SetTransform(transform); + window->layer()->SetVisible(true); { // Property sets within this scope will be implicitly animated. diff --git a/ash/wm/window_cycle_list.cc b/ash/wm/window_cycle_list.cc index b197dbf..5e7480d 100644 --- a/ash/wm/window_cycle_list.cc +++ b/ash/wm/window_cycle_list.cc @@ -33,12 +33,8 @@ WindowCycleList::~WindowCycleList() { } void WindowCycleList::Step(Direction direction) { - // Ensure we have at least one window to step to. - if (windows_.empty()) - return; - - // Don't cycle through a list of one. - if (windows_.size() == 1) + // Ensure we have more than one window to step to. + if (windows_.size() <= 1) return; if (current_index_ == -1) { |