Skip to content

Commit

Permalink
fix macos full screen mode logic
Browse files Browse the repository at this point in the history
  • Loading branch information
stuffmatic committed Apr 13, 2020
1 parent da36a62 commit 3788198
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/main/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -335,6 +335,8 @@ function createWindow() {
appMenuManager.setOpenImageItemEnabled(false)
appMenuManager.setSaveAsItemEnabled(false)
appMenuManager.setSaveItemEnabled(false)
appMenuManager.setEnterFullScreenItemEnabled(false)
appMenuManager.setExitFullScreenItemEnabled(false)
mainWindow = null
documentState = null
initialOpenMessage = null
Expand All @@ -348,6 +350,10 @@ function createWindow() {
})

window.on('leave-full-screen', (_: Event) => {
window.webContents.send(
SetSidePanelVisibilityMessage.type,
new SetSidePanelVisibilityMessage(true)
)
appMenuManager.setEnterFullScreenItemEnabled(true)
appMenuManager.setExitFullScreenItemEnabled(false)
})
Expand Down

0 comments on commit 3788198

Please sign in to comment.