Commit c817c3ef authored by Avi Drissman's avatar Avi Drissman Committed by Commit Bot

Make Views menus close when any Mac menu opens.

Before, Views menus closed when the main menu was opened; make it
so that they close when any menu opens.

BUG=985675
TEST=as in bug

Change-Id: I269a1e699def76abc79c4e496ec734936ae18f59
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1775735
Auto-Submit: Avi Drissman <avi@chromium.org>
Reviewed-by: default avatarLeonard Grey <lgrey@chromium.org>
Commit-Queue: Avi Drissman <avi@chromium.org>
Cr-Commit-Position: refs/heads/master@{#692058}
parent 81b24add
...@@ -15,7 +15,7 @@ MenuCocoaWatcherMac::MenuCocoaWatcherMac(base::OnceClosure callback) ...@@ -15,7 +15,7 @@ MenuCocoaWatcherMac::MenuCocoaWatcherMac(base::OnceClosure callback)
: callback_(std::move(callback)) { : callback_(std::move(callback)) {
observer_token_other_menu_ = [[NSNotificationCenter defaultCenter] observer_token_other_menu_ = [[NSNotificationCenter defaultCenter]
addObserverForName:NSMenuDidBeginTrackingNotification addObserverForName:NSMenuDidBeginTrackingNotification
object:[NSApp mainMenu] object:nil
queue:nil queue:nil
usingBlock:^(NSNotification* notification) { usingBlock:^(NSNotification* notification) {
ExecuteCallback(); ExecuteCallback();
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment