Hi guys, I have successfully created my own app which is in .exe using the electron packager. But I face a problem where by when I close the app using the close button on the top right of the window, it still running in the background. I will have to go to task manager to end task the app only then I can run it again. Is there anyway to avoid this? How do we close the app properly?
I have tried using the below:
app.on('window-all-closed', function() {
if (process.platform != 'win32') {
app.quit();
}
});
But have no effect.
Hi there, I have successfully close the app by using the below:
app.on('window-all-closed', function() {
if (process.platform != 'darwin') {
app.quit();
}
});
I'm using windows platform.
Does your app close in the way you expect when you use the first code snippet and run it Electron directly? (That is, without using electron-packager.)
I think the first code snippet is not for app in windows right?
That's correct. It's usually only needed for OS X, because it has a different concept of window management vs. app management.
Since the original issue reporter has not responded to the request for additional information in about two weeks, I'm going to assume that they either found the answer in another manner or decided not to pursue this issue. Additionally, this isn't really an electron-packager question, but more of an Electron question. So, I'm going to close this issue.
Most helpful comment
Since the original issue reporter has not responded to the request for additional information in about two weeks, I'm going to assume that they either found the answer in another manner or decided not to pursue this issue. Additionally, this isn't really an electron-packager question, but more of an Electron question. So, I'm going to close this issue.