Skip to content

Commit

Permalink
fix: tray icon not highlighting on empty menu (#34205)
Browse files Browse the repository at this point in the history
Co-authored-by: Shelley Vohr <shelley.vohr@gmail.com>
  • Loading branch information
trop[bot] and codebytere committed May 12, 2022
1 parent a6cee3a commit 3d82701
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions shell/browser/ui/tray_icon_cocoa.mm
Expand Up @@ -193,9 +193,9 @@ - (void)mouseDown:(NSEvent*)event {
gfx::ScreenPointFromNSPoint([event locationInWindow]),
ui::EventFlagsFromModifiers([event modifierFlags]));

// Pass click to superclass to show menu. Custom mouseUp handler won't be
// invoked.
if (menuController_) {
// Pass click to superclass to show menu if one exists and has a non-zero
// number of items. Custom mouseUp handler won't be invoked in this case.
if (menuController_ && [[menuController_ menu] numberOfItems] > 0) {
[self handleClickNotifications:event];
[super mouseDown:event];
} else {
Expand Down

0 comments on commit 3d82701

Please sign in to comment.