Don't allow opening other menus when the Exit dialog is open

Fixes #1329