Chromium Code Reviews| Index: ash/wm/activation_controller.cc |
| diff --git a/ash/wm/activation_controller.cc b/ash/wm/activation_controller.cc |
| index 668271bc5a667fad8529ca99892b86be898109d7..ec6e9f7974bb662c0699ce35495f2050767f16fb 100644 |
| --- a/ash/wm/activation_controller.cc |
| +++ b/ash/wm/activation_controller.cc |
| @@ -19,6 +19,7 @@ |
| #include "ui/aura/window_delegate.h" |
| #include "ui/base/ui_base_types.h" |
| #include "ui/compositor/layer.h" |
| +#include "ui/views/controls/menu/menu_controller.h" |
| namespace ash { |
| namespace internal { |
| @@ -284,6 +285,12 @@ void ActivationController::ActivateWindowWithEvent(aura::Window* window, |
| if (old_active && aura::client::GetActivationDelegate(old_active)) |
| aura::client::GetActivationDelegate(old_active)->OnLostActive(); |
| + // Close any open menus (crbug.com/131027). |
| + views::MenuController* menu_controller = |
| + views::MenuController::GetActiveInstance(); |
|
sky
2012/06/25 23:34:38
I don't like this dependency here. I would rather
flackr
2012/06/26 13:17:16
Sounds good to me. Done.
|
| + if (menu_controller) |
| + menu_controller->OnWidgetActivationChanged(); |
| + |
| if (window) { |
| StackTransientParentsBelowModalWindow(window); |
| window->parent()->StackChildAtTop(window); |