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

@@ -2145,6 +2145,7 @@ Qt: {maybe just Qt+macOS:} when viewing a text window ('V' to look at 'history'
window got pushed underneath the main window so seemed to go away
Qt: use idPressed signal instead of buttonPressed and mappedString instead
of mapped for recent Qt (pr #913 by chasonr)
Qt: make all NetHack menu and text windows modal
Qt: support Unicode supplementary characters (pr #1047 by chasonr)
Qt: qt_tilewidth and qt_tileheight are allocated with alloc() and need to be
freed with free(); don't use qt_tilewidth and qt_tileheight after

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()