mirror of
https://github.com/scratchfoundation/scratch-desktop.git
synced 2024-12-22 21:52:31 -05:00
Improve appWillClose() reliability
This commit is contained in:
parent
64da5dff27
commit
6486201bf9
1 changed files with 4 additions and 1 deletions
|
@ -72,10 +72,13 @@ const createMainWindow = () => {
|
|||
|
||||
// quit application when all windows are closed
|
||||
app.on('window-all-closed', () => {
|
||||
telemetry.appWillClose();
|
||||
app.quit();
|
||||
});
|
||||
|
||||
app.on('will-quit', () => {
|
||||
telemetry.appWillClose();
|
||||
});
|
||||
|
||||
// global reference to mainWindow (necessary to prevent window from being garbage collected)
|
||||
let _mainWindow;
|
||||
|
||||
|
|
Loading…
Reference in a new issue