summaryrefslogtreecommitdiffstats
path: root/ash
diff options
context:
space:
mode:
authorvarunjain@chromium.org <varunjain@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-02-03 20:40:39 +0000
committervarunjain@chromium.org <varunjain@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-02-03 20:40:39 +0000
commit3bd1b7ae9aace7915ceb9708433fcad22321cfa3 (patch)
treef4b017de25ff26d0f87e990d2918bb8cfb458991 /ash
parent8253927fe38ffc51a39e5e6e6a3c639989d3a1c5 (diff)
downloadchromium_src-3bd1b7ae9aace7915ceb9708433fcad22321cfa3.zip
chromium_src-3bd1b7ae9aace7915ceb9708433fcad22321cfa3.tar.gz
chromium_src-3bd1b7ae9aace7915ceb9708433fcad22321cfa3.tar.bz2
aura: Ignore hide animation request for a window that is already animating to
hide. BUG=110134 TEST=manual Review URL: http://codereview.chromium.org/9325009 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@120394 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ash')
-rw-r--r--ash/wm/visibility_controller.cc9
1 files changed, 9 insertions, 0 deletions
diff --git a/ash/wm/visibility_controller.cc b/ash/wm/visibility_controller.cc
index 2fe55b8..6473982 100644
--- a/ash/wm/visibility_controller.cc
+++ b/ash/wm/visibility_controller.cc
@@ -37,6 +37,15 @@ void VisibilityController::UpdateLayerVisibility(aura::Window* window,
window->type() != aura::client::WINDOW_TYPE_UNKNOWN;
animated = animated && AnimateOnChildWindowVisibilityChanged(window, visible);
+ if (!visible) {
+ // For window hiding animation, we want to check if the window is already
+ // animating, and not do SetVisible(false) if it is.
+ // TODO(vollick): remove this.
+ animated = animated || (window->layer()->GetAnimator()->
+ IsAnimatingProperty(ui::LayerAnimationElement::OPACITY) &&
+ window->layer()->GetTargetOpacity() == 0.0f);
+ }
+
// When a window is made visible, we always make its layer visible
// immediately. When a window is hidden, the layer must be left visible and
// only made not visible once the animation is complete.