From 16fafb1516a346ee0553a329b0606c2bb55283d7 Mon Sep 17 00:00:00 2001 From: ewewukek Date: Tue, 2 Apr 2024 08:18:17 +0300 Subject: Consume input event in QuitDialog instead of relying on a hack --- src/gui/windows/quitdialog.cpp | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'src/gui/windows/quitdialog.cpp') diff --git a/src/gui/windows/quitdialog.cpp b/src/gui/windows/quitdialog.cpp index d1ceb1ad9..7ef2bc6e8 100644 --- a/src/gui/windows/quitdialog.cpp +++ b/src/gui/windows/quitdialog.cpp @@ -210,6 +210,7 @@ void QuitDialog::keyPressed(KeyEvent &event) { const InputActionT actionId = event.getActionId(); int dir = 0; + bool consume = true; PRAGMA45(GCC diagnostic push) PRAGMA45(GCC diagnostic ignored "-Wswitch-enum") @@ -229,10 +230,14 @@ void QuitDialog::keyPressed(KeyEvent &event) dir = 1; break; default: + consume = false; break; } PRAGMA45(GCC diagnostic pop) + if (consume) + event.consume(); + if (dir != 0) { STD_VECTOR::const_iterator it = mOptions.begin(); -- cgit v1.2.3-70-g09d2