Merge pull request #953 from mattermost/MM-14172

[MM-14172] Fix black screen when closing window in fullscreen on a Mac
This commit is contained in:
Dean Whillier
2019-03-26 09:29:20 -04:00
committed by GitHub

View File

@@ -110,7 +110,15 @@ function createMainWindow(config, options) {
} }
break; break;
case 'darwin': case 'darwin':
hideWindow(mainWindow); // need to leave fullscreen first, then hide the window
if (mainWindow.isFullScreen()) {
mainWindow.once('leave-full-screen', () => {
hideWindow(mainWindow);
});
mainWindow.setFullScreen(false);
} else {
hideWindow(mainWindow);
}
break; break;
default: default:
} }