mirror of
https://github.com/BoostIo/Boostnote
synced 2025-12-13 01:36:22 +00:00
Merge pull request #349 from asmsuechan/iss-332
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,19 @@ 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 {
|
||||
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) {
|
||||
|
||||
Reference in New Issue
Block a user