From a5ff518d83644c33fd26c44b724b36d065fbb402 Mon Sep 17 00:00:00 2001 From: "simon.hong81@gmail.com" Date: Tue, 2 Jul 2013 22:35:20 +0000 Subject: Alt-tab should provide visible feedback if there is only one window. When user presses alt-tab, active window shows bouncing effect when there is only one window. R=jamescook@chromium.org BUG=154150 TEST=Compiles, Visual test Review URL: https://chromiumcodereview.appspot.com/18255004 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@209800 0039d316-1c4b-4281-b951-d872f2087c98 --- ash/wm/window_cycle_list.cc | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'ash/wm') diff --git a/ash/wm/window_cycle_list.cc b/ash/wm/window_cycle_list.cc index 7ea875b..fd39d0f 100644 --- a/ash/wm/window_cycle_list.cc +++ b/ash/wm/window_cycle_list.cc @@ -6,6 +6,7 @@ #include "ash/wm/window_util.h" #include "ui/aura/window.h" +#include "ui/views/corewm/window_animations.h" namespace ash { @@ -41,8 +42,12 @@ void WindowCycleList::Step(Direction direction) { // provided window list. Just switch to the first (or last) one. current_index_ = (direction == FORWARD ? 0 : windows_.size() - 1); } else { - if (windows_.size() == 1) + // When there is only one window, we should give a feedback to user. + if (windows_.size() == 1) { + AnimateWindow(windows_[0], + views::corewm::WINDOW_ANIMATION_TYPE_BOUNCE); return; + } // We're in a valid cycle, so step forward or backward. current_index_ += (direction == FORWARD ? 1 : -1); } -- cgit v1.1