fix: black screen on macOS after maximizing LBRY and then closing (#1235)

This commit is contained in:
miikkatu 2018-04-02 23:19:47 +03:00 committed by Igor Gassmann
parent 2fa552a2c0
commit 0ad2b3c7f9

View file

@ -78,7 +78,14 @@ export default appState => {
window.on('close', event => { window.on('close', event => {
if (!appState.isQuitting && !appState.autoUpdateAccepted) { if (!appState.isQuitting && !appState.autoUpdateAccepted) {
event.preventDefault(); event.preventDefault();
if (window.isFullScreen()) {
window.once('leave-full-screen', () => {
window.hide(); window.hide();
});
window.setFullScreen(false);
} else {
window.hide();
}
} }
}); });