feat: allow windows to be excluded from the windows menu (#17404)

* feat: allow windows to be excluded from the windows menu

* excludedfromWindowsMenu => excludedFromShownWindowsMenu

* implement no-op for win & linux
This commit is contained in:
Shelley Vohr 2019-03-27 08:10:23 -04:00 committed by GitHub
parent ec5e0ef06e
commit 4e57a732a8
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
8 changed files with 57 additions and 0 deletions

View file

@ -1648,3 +1648,24 @@ removed in future Electron releases.
[vibrancy-docs]: https://developer.apple.com/documentation/appkit/nsvisualeffectview?preferredLanguage=objc
[window-levels]: https://developer.apple.com/documentation/appkit/nswindow/level
[chrome-content-scripts]: https://developer.chrome.com/extensions/content_scripts#execution-environment
### Properties
#### `win.excludedFromShownWindowsMenu` _macOS_
A `Boolean` property that determines whether the window is excluded from the applications Windows menu. `false` by default.
```js
const win = new BrowserWindow({ height: 600, width: 600 })
const template = [
{
role: 'windowmenu'
}
]
win.excludedFromShownWindowsMenu = true
const menu = Menu.buildFromTemplate(template)
Menu.setApplicationMenu(menu)
```