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:
@@ -40,12 +40,20 @@ mainWindow.webContents.sendInputEvent({
|
|||||||
|
|
||||||
if (process.platform !== 'linux' || process.env.DESKTOP_SESSION === 'cinnamon') {
|
if (process.platform !== 'linux' || process.env.DESKTOP_SESSION === 'cinnamon') {
|
||||||
mainWindow.on('close', function (e) {
|
mainWindow.on('close', function (e) {
|
||||||
|
e.preventDefault()
|
||||||
if (process.platform === 'win32') {
|
if (process.platform === 'win32') {
|
||||||
mainWindow.minimize()
|
mainWindow.minimize()
|
||||||
} else {
|
} else {
|
||||||
mainWindow.hide()
|
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) {
|
app.on('before-quit', function (e) {
|
||||||
|
|||||||
Reference in New Issue
Block a user