Qt: make all menus modal

This fixes a lot of problems where a menu or a text window was up
and the main window accepted input - for example you could move around,
making another window of the same type pop up ...
This commit is contained in:
Pasi Kallinen
2024-03-04 11:37:06 +02:00
parent eb294ef4e1
commit 2de0c8cacb
2 changed files with 3 additions and 0 deletions

View File

@@ -220,6 +220,7 @@ NetHackQtMenuWindow::NetHackQtMenuWindow(QWidget *parent) :
this, SLOT(TableCellClicked(int,int)));
setLayout(grid);
setModal(true);
}
NetHackQtMenuWindow::~NetHackQtMenuWindow()
@@ -1013,6 +1014,7 @@ NetHackQtTextWindow::NetHackQtTextWindow(QWidget *parent) :
setFocusPolicy(Qt::StrongFocus);
// needed so that keystrokes get sent to our keyPressEvent()
lines->setFocusPolicy(Qt::NoFocus);
setModal(true);
}
void NetHackQtTextWindow::doUpdate()