summaryrefslogtreecommitdiff
path: root/src/mainwindow.cpp
diff options
context:
space:
mode:
authorAl <26797547+Al12rs@users.noreply.github.com>2020-12-01 14:06:15 -0800
committerGitHub <noreply@github.com>2020-12-01 14:06:15 -0800
commit5ff024b77c817690010aecacf1fb7ed545f4678f (patch)
tree23316c95cbd6dabd70cc9553fe88a13b54d2fb39 /src/mainwindow.cpp
parent1ec3ab2b8a845f75495b4cacbeb17c86ea137a01 (diff)
parentce7345bde2af851226e9c2bdef38baa433d4897e (diff)
Merge pull request #1300 from Qudix/ignore_alt
Ignore ALT-key event when ui is locked
Diffstat (limited to 'src/mainwindow.cpp')
-rw-r--r--src/mainwindow.cpp12
1 files changed, 8 insertions, 4 deletions
diff --git a/src/mainwindow.cpp b/src/mainwindow.cpp
index 69f90ce4..d0ed5029 100644
--- a/src/mainwindow.cpp
+++ b/src/mainwindow.cpp
@@ -6491,10 +6491,14 @@ void MainWindow::dropEvent(QDropEvent *event)
void MainWindow::keyReleaseEvent(QKeyEvent *event)
{
- // if the menubar is hidden, pressing Alt will make it visible
- if (event->key() == Qt::Key_Alt) {
- if (!ui->menuBar->isVisible()) {
- ui->menuBar->show();
+ // if the ui is locked, ignore the ALT key event
+ // alt-tabbing out of a game triggers this
+ if (!UILocker::instance().locked()) {
+ // if the menubar is hidden, pressing Alt will make it visible
+ if (event->key() == Qt::Key_Alt) {
+ if (!ui->menuBar->isVisible()) {
+ ui->menuBar->show();
+ }
}
}