When I exit Openbox by selecting Exit from its desktop menu or by running openbox --exit
from a Terminal window, it seems to instantly kill all the processes and then terminate. This results in processes not exiting cleanly. For example, when I edit an open file in vim again, it gives me the prompt about recovering an interrupted session.
How can I exit Openbox in such a way that a Quit command gets sent to running applications, or so that if any applications haven't saved current information, they can reject the attempt to exit? Basically, I'm looking for something analogous to logging out in most desktop managers.