This question already has an answer here:
There are many ways to close apps: mouse-and-click on an 'x' somewhere, choose "Quit" as a menu option, keyboard shortcuts (ctrl-w, cmd-q, alt-f4 etc.)
I notice some apps I use ask me "Are you sure you want to exit?" when I try to close them.
What are the UX guidelines as to when there should be an "Are you sure you want to exit?" confirmation dialogue?