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

Unified Diff: ui/views/controls/menu/menu_controller.cc

Issue 547303003: Keep reference view pressed while extension actions have a popup (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 3 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
Index: ui/views/controls/menu/menu_controller.cc
diff --git a/ui/views/controls/menu/menu_controller.cc b/ui/views/controls/menu/menu_controller.cc
index 12c5aae5351eb5759e048fc629f9b5e8cc3380c8..27d413b62f5690dda55841d130274e36e0193528 100644
--- a/ui/views/controls/menu/menu_controller.cc
+++ b/ui/views/controls/menu/menu_controller.cc
@@ -435,11 +435,12 @@ MenuItemView* MenuController::Run(Widget* parent,
}
// If we stopped running because one of the menus was destroyed chances are
- // the button was also destroyed.
- if (exit_type_ != EXIT_DESTROYED && menu_button_) {
+ // the button was also destroyed. If there is a menu visible on the button, it
+ // will clean itself up.
+ if (exit_type_ != EXIT_DESTROYED &&
+ menu_button_ &&
+ !menu_button_->menu_visible())
menu_button_->SetState(CustomButton::STATE_NORMAL);
- menu_button_->SchedulePaint();
- }
return result;
}
« ui/views/controls/button/menu_button.h ('K') | « ui/views/controls/button/menu_button.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698