mirror of
https://github.com/CringeStudios/element-desktop.git
synced 2025-01-19 07:54:59 +01:00
Merge pull request #192 from aaronraimist/close-fullscreen-macos
Prevent black screen when closing window while in full screen mode on macOS
This commit is contained in:
commit
75b41d65c1
@ -955,7 +955,15 @@ app.on('ready', async () => {
|
|||||||
// (this is generally how single-window Mac apps
|
// (this is generally how single-window Mac apps
|
||||||
// behave, eg. Mail.app)
|
// behave, eg. Mail.app)
|
||||||
e.preventDefault();
|
e.preventDefault();
|
||||||
mainWindow.hide();
|
|
||||||
|
if (mainWindow.isFullScreen()) {
|
||||||
|
mainWindow.once('leave-full-screen', () => mainWindow.hide());
|
||||||
|
|
||||||
|
mainWindow.setFullScreen(false);
|
||||||
|
} else {
|
||||||
|
mainWindow.hide();
|
||||||
|
}
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
Loading…
Reference in New Issue
Block a user