Unregister shortcuts on will-quit

This commit is contained in:
akashnimare
2016-12-23 02:10:45 +05:30
parent eac2b92cb6
commit a0de440c2e

View File

@@ -150,6 +150,8 @@ function createMainWindow() {
app.commandLine.appendSwitch('ignore-certificate-errors', 'true');
app.on('window-all-closed', () => {
// unregister all the shortcuts so that they don't interfare with other apps
electronLocalshortcut.unregisterAll(mainWindow);
if (process.platform !== 'darwin') {
app.quit();
}
@@ -207,7 +209,7 @@ app.on('ready', () => {
});
});
app.on('window-all-closed' || 'will-quit', () => {
app.on('will-quit', () => {
// unregister all the shortcuts so that they don't interfare with other apps
electronLocalshortcut.unregisterAll(mainWindow);
});