mac: Make sure menuWillShow is called when setting application menu.
This commit is contained in:
parent
6a48568911
commit
cd35430d0e
1 changed files with 6 additions and 0 deletions
|
@ -97,6 +97,12 @@ Menu.setApplicationMenu = (menu) ->
|
||||||
applicationMenu = menu # Keep a reference.
|
applicationMenu = menu # Keep a reference.
|
||||||
|
|
||||||
if process.platform is 'darwin'
|
if process.platform is 'darwin'
|
||||||
|
# Force menuWillShow to be called
|
||||||
|
menuWillShow = (menu) ->
|
||||||
|
menu.delegate.menuWillShow()
|
||||||
|
menuWillShow item.submenu for item in menu.items when item.submenu?
|
||||||
|
menuWillShow menu
|
||||||
|
|
||||||
bindings.setApplicationMenu menu
|
bindings.setApplicationMenu menu
|
||||||
else
|
else
|
||||||
windows = BrowserWindow.getAllWindows()
|
windows = BrowserWindow.getAllWindows()
|
||||||
|
|
Loading…
Reference in a new issue