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

Unified Diff: chrome/browser/ui/cocoa/menu_button.mm

Issue 6969058: Fix hover state in wrench menu (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Addressed review comments Created 9 years, 7 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 | chrome/browser/ui/cocoa/nsview_additions.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/cocoa/menu_button.mm
diff --git a/chrome/browser/ui/cocoa/menu_button.mm b/chrome/browser/ui/cocoa/menu_button.mm
index 07111ab8ad57f589bc7ade98bce9d152cd3c4c99..a49dbab0a59f7867127033d6a21a58cc5fab0d52 100644
--- a/chrome/browser/ui/cocoa/menu_button.mm
+++ b/chrome/browser/ui/cocoa/menu_button.mm
@@ -7,6 +7,7 @@
#include "base/logging.h"
#include "base/memory/scoped_nsobject.h"
#import "chrome/browser/ui/cocoa/clickhold_button_cell.h"
+#import "chrome/browser/ui/cocoa/nsview_additions.h"
@interface MenuButton (Private)
- (void)showMenu:(BOOL)isDragging;
@@ -137,6 +138,15 @@
inView:self];
[popUpCell_ performClickWithFrame:frame
inView:self];
+
+ // Once the menu is dismissed send a mouseExited event if necessary. If the
+ // menu action caused the super view to resize then we won't automatically
+ // get a mouseExited event so we need to do this manually.
+ // See http://crbug.com/82456
+ if (![self cr_isMouseInView]) {
+ if ([[self cell] respondsToSelector:@selector(mouseExited:)])
+ [[self cell] mouseExited:nil];
+ }
}
// Called when the button is clicked and released. (Shouldn't happen with
« no previous file with comments | « no previous file | chrome/browser/ui/cocoa/nsview_additions.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698