summaryrefslogtreecommitdiffstats
path: root/ash/wm
diff options
context:
space:
mode:
authorskuhne@chromium.org <skuhne@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-09-12 21:09:05 +0000
committerskuhne@chromium.org <skuhne@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-09-12 21:09:05 +0000
commit8950bff5d0440600cfb794d3f93c4dc332ce7970 (patch)
treefaeb50a297eb23c3f774b09792f546b39f59da52 /ash/wm
parented118a8f2b0dc81512753f1756da307dae33dcf6 (diff)
downloadchromium_src-8950bff5d0440600cfb794d3f93c4dc332ce7970.zip
chromium_src-8950bff5d0440600cfb794d3f93c4dc332ce7970.tar.gz
chromium_src-8950bff5d0440600cfb794d3f93c4dc332ce7970.tar.bz2
Fixing problem where opening a menu while closing another can close the new menu unexpectedly
The problem was as follows: When the app list menu gets closed it gets closed delayed. The right click menu opens. Once the menu got animated out, it will destruct itself. When doing so it will surrender its activation state to the system and the menu controller will close all menus. To avoid this I remove the activation state before the app list gets destroyed. (At that point in time it is not active anymore anyways). I also tried to set the focus in the menu runner on its parent - but that widget is not activatable and that does not work. BUG=285785 TEST=visual Review URL: https://chromiumcodereview.appspot.com/23457008 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@222868 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ash/wm')
-rw-r--r--ash/wm/app_list_controller.cc7
1 files changed, 7 insertions, 0 deletions
diff --git a/ash/wm/app_list_controller.cc b/ash/wm/app_list_controller.cc
index ec169fe..d42ff42 100644
--- a/ash/wm/app_list_controller.cc
+++ b/ash/wm/app_list_controller.cc
@@ -149,6 +149,13 @@ void AppListController::SetVisible(bool visible, aura::Window* window) {
UpdateAutoHideState();
if (view_) {
+ // Our widget is currently active. When the animation completes we'll hide
+ // the widget, changing activation. If a menu is shown before the animation
+ // completes then the activation change triggers the menu to close. By
+ // deactivating now we ensure there is no activation change when the
+ // animation completes and any menus stay open.
+ if (!visible)
+ view_->GetWidget()->Deactivate();
ScheduleAnimation();
} else if (is_visible_) {
// AppListModel and AppListViewDelegate are owned by AppListView. They