mirror of
https://github.com/CringeStudios/element-desktop.git
synced 2025-01-18 23:44:59 +01:00
Prevent black screen when closing window while in full screen mode on macOS
Signed-off-by: Aaron Raimist <aaron@raim.ist>
This commit is contained in:
parent
989b4df6c6
commit
cc5dc4d801
@ -952,7 +952,15 @@ app.on('ready', async () => {
|
||||
// (this is generally how single-window Mac apps
|
||||
// behave, eg. Mail.app)
|
||||
e.preventDefault();
|
||||
mainWindow.hide();
|
||||
|
||||
if (mainWindow.isFullScreen()) {
|
||||
mainWindow.once('leave-full-screen', () => mainWindow.hide());
|
||||
|
||||
mainWindow.setFullScreen(false);
|
||||
} else {
|
||||
mainWindow.hide();
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
});
|
||||
|
Loading…
Reference in New Issue
Block a user