Skip to content

TagSpaces is an offline, open source, document manager with tagging support

fix: disabling opening new electron window on activation

Ilian Sapundshiev644401b2f80f
diff --git a/src/main/main.ts b/src/main/main.ts
index 8e7211eee..c1614c719 100644
--- a/src/main/main.ts
+++ b/src/main/main.ts
@@ -573,12 +573,14 @@ app.on('window-all-closed', () => {
}
});
-app.on('activate', function () {
+app.on('activate', (event, hasVisibleWindows) => {
+ // console.log('Activate ' + hasVisibleWindows);
+ event.preventDefault();
// On macOS it's common to re-create a window in the app when the
// dock icon is clicked and there are no other windows open.
- if (BrowserWindow.getAllWindows().length === 0) {
- createWindow(appI18N);
- }
+ // if (BrowserWindow.getAllWindows().length === 0) {
+ // createWindow(appI18N);
+ // }
});
app.on('quit', () => {