mirror of
https://github.com/scratchfoundation/scratch-desktop.git
synced 2025-01-10 14:42:09 -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
|
// quit application when all windows are closed
|
||||||
app.on('window-all-closed', () => {
|
app.on('window-all-closed', () => {
|
||||||
telemetry.appWillClose();
|
|
||||||
app.quit();
|
app.quit();
|
||||||
});
|
});
|
||||||
|
|
||||||
|
app.on('will-quit', () => {
|
||||||
|
telemetry.appWillClose();
|
||||||
|
});
|
||||||
|
|
||||||
// global reference to mainWindow (necessary to prevent window from being garbage collected)
|
// global reference to mainWindow (necessary to prevent window from being garbage collected)
|
||||||
let _mainWindow;
|
let _mainWindow;
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue