From 0bf37b8763a2d3f8f18f26635d862a50c2850c8d Mon Sep 17 00:00:00 2001 From: Sam Atkins Date: Wed, 14 Dec 2022 15:36:06 +0000 Subject: [PATCH] Solitaire: Ignore unhandled keydown events This makes Action shortcuts work again. :^) --- Userland/Games/Solitaire/Game.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/Userland/Games/Solitaire/Game.cpp b/Userland/Games/Solitaire/Game.cpp index 9e224d94a19..113f6067264 100644 --- a/Userland/Games/Solitaire/Game.cpp +++ b/Userland/Games/Solitaire/Game.cpp @@ -207,8 +207,10 @@ void Game::update_score(int to_add) void Game::keydown_event(GUI::KeyEvent& event) { - if (is_moving_cards() || m_new_game_animation || m_game_over_animation) + if (is_moving_cards() || m_new_game_animation || m_game_over_animation) { + event.ignore(); return; + } if (event.shift() && event.key() == KeyCode::Key_F12) { start_game_over_animation(); @@ -220,6 +222,8 @@ void Game::keydown_event(GUI::KeyEvent& event) if constexpr (SOLITAIRE_DEBUG) { dump_layout(); } + } else { + event.ignore(); } }