summaryrefslogtreecommitdiff
path: root/src/game.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/game.cpp')
-rw-r--r--src/game.cpp11
1 files changed, 9 insertions, 2 deletions
diff --git a/src/game.cpp b/src/game.cpp
index 0082040dc..259317545 100644
--- a/src/game.cpp
+++ b/src/game.cpp
@@ -754,8 +754,15 @@ void Game::handleInput()
case KeyboardConfig::KEY_QUIT:
if (!chatWindow->isInputFocused())
{
- quitDialog = new QuitDialog(&quitDialog);
- quitDialog->requestMoveToTop();
+ if (viewport && viewport->isPopupMenuVisible())
+ {
+ viewport->closePopupMenu();
+ }
+ else
+ {
+ quitDialog = new QuitDialog(&quitDialog);
+ quitDialog->requestMoveToTop();
+ }
return;
}
break;