Add alternate fullscreen shortcut ⌘+Shift+F (fix #26)

Uses https://npmjs.com/package/electron-localshortcut to workaround a
bug in Electron (https://github.com/atom/electron/issues/1334).

We can remove `electron-localshortcut` once that bug is fixed.
This commit is contained in:
Feross Aboukhadijeh
2016-03-05 17:05:41 -08:00
parent 30ec87e7a7
commit 7eeda57b57
5 changed files with 23 additions and 6 deletions

View File

@@ -18,7 +18,7 @@ function onWindowHide () {
function toggleFullScreen () {
debug('toggleFullScreen')
if (windows.main) {
if (windows.main && windows.main.isVisible()) {
windows.main.setFullScreen(!windows.main.isFullScreen())
}
}
@@ -289,7 +289,8 @@ var menu = {
appMenu: appMenu,
onToggleFullScreen: onToggleFullScreen,
onWindowHide: onWindowHide,
onWindowShow: onWindowShow
onWindowShow: onWindowShow,
toggleFullScreen: toggleFullScreen
}
module.exports = menu