Skip to content

Commit

Permalink
fix black screen when closing window in fullscreen
Browse files Browse the repository at this point in the history
  • Loading branch information
deanwhillier committed Mar 20, 2019
1 parent 79e020b commit c17fdc2
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion src/main/mainWindow.js
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,15 @@ function createMainWindow(config, options) {
}
break;
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;
default:
}
Expand Down

0 comments on commit c17fdc2

Please sign in to comment.