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

Unified Diff: ui/app_list/cocoa/apps_grid_view_item.mm

Issue 93793012: Squelch context menus on the OSX App List when both buttons are pressed. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 11 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 | « ui/app_list/cocoa/apps_grid_controller_unittest.mm ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/app_list/cocoa/apps_grid_view_item.mm
diff --git a/ui/app_list/cocoa/apps_grid_view_item.mm b/ui/app_list/cocoa/apps_grid_view_item.mm
index e3101efcbbbf33ccf768f134ea1698b19b20c0da..fec60aae15c774fe22240e6ff4e2b0541ab9feff 100644
--- a/ui/app_list/cocoa/apps_grid_view_item.mm
+++ b/ui/app_list/cocoa/apps_grid_view_item.mm
@@ -319,6 +319,10 @@ void ItemModelObserverBridge::ItemPercentDownloadedChanged() {
}
- (NSMenu*)contextMenu {
+ // Don't show the menu if button is already held down, e.g. with a left-click.
+ if ([[[self button] cell] isHighlighted])
+ return nil;
+
[self setSelected:YES];
return observerBridge_->GetContextMenu();
}
« no previous file with comments | « ui/app_list/cocoa/apps_grid_controller_unittest.mm ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698