mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-11-26 17:40:27 +00:00
Solitaire: Ignore unhandled keydown events
This makes Action shortcuts work again. :^)
This commit is contained in:
parent
9665f41979
commit
0bf37b8763
Notes:
sideshowbarker
2024-07-17 06:35:23 +09:00
Author: https://github.com/AtkinsSJ Commit: https://github.com/SerenityOS/serenity/commit/0bf37b8763 Pull-request: https://github.com/SerenityOS/serenity/pull/16494 Reviewed-by: https://github.com/linusg ✅
1 changed files with 5 additions and 1 deletions
|
@ -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();
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue