summaryrefslogtreecommitdiffstats
path: root/chrome/views/menu_button.cc
diff options
context:
space:
mode:
Diffstat (limited to 'chrome/views/menu_button.cc')
-rw-r--r--chrome/views/menu_button.cc23
1 files changed, 11 insertions, 12 deletions
diff --git a/chrome/views/menu_button.cc b/chrome/views/menu_button.cc
index a723e87..59b0aa2 100644
--- a/chrome/views/menu_button.cc
+++ b/chrome/views/menu_button.cc
@@ -170,7 +170,6 @@ bool MenuButton::Activate() {
// or selected an item) and we will inevitably refresh the hot state
// in the event the mouse _is_ over the view.
SetState(BS_NORMAL);
- SchedulePaint();
// We must return false here so that the RootView does not get stuck
// sending all mouse pressed events to us instead of the appropriate
@@ -217,6 +216,17 @@ bool MenuButton::OnKeyReleased(const KeyEvent& e) {
return true;
}
+// The reason we override View::OnMouseExited is because we get this event when
+// we display the menu. If we don't override this method then
+// BaseButton::OnMouseExited will get the event and will set the button's state
+// to BS_NORMAL instead of keeping the state BM_PUSHED. This, in turn, will
+// cause the button to appear depressed while the menu is displayed.
+void MenuButton::OnMouseExited(const MouseEvent& event) {
+ if ((state_ != BS_DISABLED) && (!menu_visible_) && (!InDrag())) {
+ SetState(BS_NORMAL);
+ }
+}
+
////////////////////////////////////////////////////////////////////////////////
//
// MenuButton - accessibility
@@ -245,15 +255,4 @@ bool MenuButton::GetAccessibleState(VARIANT* state) {
return true;
}
-// The reason we override View::OnMouseExited is because we get this event when
-// we display the menu. If we don't override this method then
-// BaseButton::OnMouseExited will get the event and will set the button's state
-// to BS_NORMAL instead of keeping the state BM_PUSHED. This, in turn, will
-// cause the button to appear depressed while the menu is displayed.
-void MenuButton::OnMouseExited(const MouseEvent& event) {
- if ((state_ != BS_DISABLED) && (!menu_visible_) && (!InDrag())) {
- SetState(BS_NORMAL);
- }
-}
-
} // namespace views