diff --git a/index.js b/index.js index 1055328..079a8ec 100644 --- a/index.js +++ b/index.js @@ -166,4 +166,11 @@ function showMainWindow() { app.quit(); } }); + + mainWindow.on('close',function(e){ + var choice = dialog.showMessageBox({"type":'question','buttons':['Yes','No'],'title':'Confirm','message':'Are you sure you want to close the client?'}); + if(choice == 1){ + e.preventDefault(); + } + }); }