1
0
mirror of https://github.com/BoostIo/Boostnote synced 2025-12-13 01:36:22 +00:00

Fix the screen become black on closing Boostnote when a state of Boostnote is fullscreen on mac

This commit is contained in:
asmsuechan
2017-03-22 00:00:45 -07:00
parent 8315b75587
commit 095910d156

View File

@@ -40,12 +40,20 @@ mainWindow.webContents.sendInputEvent({
if (process.platform !== 'linux' || process.env.DESKTOP_SESSION === 'cinnamon') {
mainWindow.on('close', function (e) {
e.preventDefault()
if (process.platform === 'win32') {
mainWindow.minimize()
} else {
if(mainWindow.isFullScreen()){
mainWindow.once('leave-full-screen', function () {
mainWindow.hide()
})
mainWindow.setFullScreen(false)
}
else{
mainWindow.hide()
}
e.preventDefault()
}
})
app.on('before-quit', function (e) {