Skip to content

Commit

Permalink
Merge pull request #445 from RocketChat/bugfix/fullscreen
Browse files Browse the repository at this point in the history
Fix bug when closing app in fullscreen
  • Loading branch information
engelgabriel committed May 14, 2017
2 parents 939f3d7 + 6347112 commit 8aef5c4
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion src/background.custom.js
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,14 @@ export function afterMainWindow (mainWindow) {
return;
}
event.preventDefault();
mainWindow.hide();
if (mainWindow.isFullScreen()) {
mainWindow.once('leave-full-screen', () => {
mainWindow.hide();
});
mainWindow.setFullScreen(false);
} else {
mainWindow.hide();
}
mainWindowState.saveState(mainWindow);
});

Expand Down

0 comments on commit 8aef5c4

Please sign in to comment.