skevy / graphiql-app

Light, Electron-based Wrapper around GraphiQL
MIT License
2.95k stars 336 forks source link

OSX: Close App When All Windows Closed #195

Open MutableLoss opened 2 years ago

MutableLoss commented 2 years ago

Fix Closes the app when the renderer process is stopped when using on OSX, so menu item errors cannot be thrown.

Reason: What lead me to this PR, was that the menu items will throw errors when the renderer is closed. This update makes sure the main process is killed with the renderer process, so this cannot happen.

The main process menu items requires the webContents object to be present, and without a tray menu, I'm not seeing a reason for the app to stay open after the main renderer process closes in OSX. Maybe I'm overlooking something?