Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(266)

Unified Diff: ash/wm/activation_controller.cc

Issue 10668037: Close any open menus on activation changes. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | ui/views/widget/widget.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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);
« no previous file with comments | « no previous file | ui/views/widget/widget.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698