mirror of
https://github.com/BoostIo/Boostnote
synced 2025-12-14 18:26:26 +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') {
|
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