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:
@@ -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:
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user