From 60688ecf5bc6e44795472cb22888ec5994a904a8 Mon Sep 17 00:00:00 2001 From: Qudix <17361645+Qudix@users.noreply.github.com> Date: Wed, 18 Nov 2020 02:13:25 -0600 Subject: Ignore ALT-key event when ui is locked --- src/mainwindow.cpp | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/src/mainwindow.cpp b/src/mainwindow.cpp index 4e78f5dd..2bb0a237 100644 --- a/src/mainwindow.cpp +++ b/src/mainwindow.cpp @@ -6495,10 +6495,12 @@ 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 (!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(); + } } } -- cgit v1.3.1 From ce7345bde2af851226e9c2bdef38baa433d4897e Mon Sep 17 00:00:00 2001 From: Seth Riley <17361645+Qudix@users.noreply.github.com> Date: Tue, 1 Dec 2020 16:05:23 -0600 Subject: The Golden Comment --- src/mainwindow.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/mainwindow.cpp b/src/mainwindow.cpp index 3ea55ef8..d0ed5029 100644 --- a/src/mainwindow.cpp +++ b/src/mainwindow.cpp @@ -6491,6 +6491,8 @@ void MainWindow::dropEvent(QDropEvent *event) void MainWindow::keyReleaseEvent(QKeyEvent *event) { + // 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) { -- cgit v1.3.1