🐛 only dispose shared process on last window close on non macos

This commit is contained in:
Joao Moreno
2017-03-06 11:40:40 +01:00
parent b7eefb7e8c
commit 31e95c9280

View File

@@ -175,8 +175,9 @@ function main(accessor: ServicesAccessor, mainIpcServer: Server, userEnv: platfo
// TODO@Joao: unfold this
windowsMainService = accessor.get(IWindowsMainService);
// TODO@Joao: so ugly...
windowsMainService.onWindowClose(() => {
if (windowsMainService.getWindowCount() === 0) {
if (!platform.isMacintosh && windowsMainService.getWindowCount() === 0) {
sharedProcess.dispose();
}
});
@@ -223,6 +224,7 @@ function main(accessor: ServicesAccessor, mainIpcServer: Server, userEnv: platfo
}
configurationService.dispose();
sharedProcess.dispose();
}
// Dispose on app quit