feat(closing): fast window closing/hiding

This commit is contained in:
Alexey Kasyanchuk 2018-08-05 00:38:11 +03:00
parent 9d5667eb00
commit 585b683380

View File

@ -201,10 +201,7 @@ app.on("ready", () => {
} }, } },
{ label: 'Quit', click: function(){ { label: 'Quit', click: function(){
app.isQuiting = true; app.isQuiting = true;
if (sphinx)
stop() stop()
else
app.quit()
} } } }
]); ]);
@ -294,6 +291,10 @@ const stop = () => {
return return
stopProtect = true stopProtect = true
// hide on case of long exit, to prevent user clicks
if(mainWindow)
mainWindow.hide()
if(tray) if(tray)
tray.destroy() tray.destroy()