fix: crash when tray popup called twice (#18999)
This commit is contained in:
parent
e44bb8474b
commit
a4f61565c3
1 changed files with 3 additions and 3 deletions
|
@ -340,9 +340,6 @@ const CGFloat kVerticalTitleMargin = 2;
|
|||
// Make sure events can be pumped while the menu is up.
|
||||
base::MessageLoopCurrent::ScopedNestableTaskAllower allow;
|
||||
|
||||
// Ensure the UI can update while the menu is fading out.
|
||||
base::ScopedPumpMessagesInPrivateModes pump_private;
|
||||
|
||||
// Show a custom menu.
|
||||
if (menu_model) {
|
||||
base::scoped_nsobject<AtomMenuController> menuController(
|
||||
|
@ -358,6 +355,9 @@ const CGFloat kVerticalTitleMargin = 2;
|
|||
}
|
||||
|
||||
if (menuController_ && ![menuController_ isMenuOpen]) {
|
||||
// Ensure the UI can update while the menu is fading out.
|
||||
base::ScopedPumpMessagesInPrivateModes pump_private;
|
||||
|
||||
// Redraw the tray icon to show highlight if it is enabled.
|
||||
[self setNeedsDisplay:YES];
|
||||
|
||||
|
|
Loading…
Reference in a new issue