Skip to content

Build your personal knowledge base with Trilium Notes

small fixes to tray and closing windows

zadam563808144e90
diff --git a/electron.js b/electron.js
index cc3f866461..9ad294b852 100644
--- a/electron.js
+++ b/electron.js
@@ -14,12 +14,11 @@ appIconService.installLocalAppIcon();
require('electron-dl')({ saveAs: true });
app.on('window-all-closed', () => {
- if (process.platform !== 'darwin') {
+ if (process.platform === 'win32') {
+ app.exit(0); // attempt to fix the issue when app.quit() won't terminate processes on windows
+ } else {
app.quit();
}
- else if (process.platform === 'win32') {
- app.exit(0); // attempt to fix the issue when app.quite() won't terminate processes on windows
- }
});
app.on('ready', async () => {
diff --git a/src/services/tray.js b/src/services/tray.js
index 7493e5c8b4..137bf4cefe 100644
--- a/src/services/tray.js
+++ b/src/services/tray.js
@@ -62,6 +62,7 @@ const updateTrayMenu = () => {
mainWindow.hide();
} else {
mainWindow.show();
+ mainWindow.focus();
}
}
},