From c3eadd5b630b7fd2965c2a2b093ae9f9134f2938 Mon Sep 17 00:00:00 2001 From: Cheng Zhao Date: Mon, 1 Jan 2018 16:49:25 +0900 Subject: [PATCH] mac: Call callback when menu is programmely closed --- atom/browser/ui/cocoa/atom_menu_controller.mm | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/atom/browser/ui/cocoa/atom_menu_controller.mm b/atom/browser/ui/cocoa/atom_menu_controller.mm index cee7b639897b..2f652ab270de 100644 --- a/atom/browser/ui/cocoa/atom_menu_controller.mm +++ b/atom/browser/ui/cocoa/atom_menu_controller.mm @@ -115,8 +115,9 @@ static base::scoped_nsobject recentDocumentsMenuSwap_; - (void)cancel { if (isMenuOpen_) { [menu_ cancelTracking]; - model_->MenuWillClose(); isMenuOpen_ = NO; + model_->MenuWillClose(); + closeCallback.Run(); } }