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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user