From 379c7c2f646ccf7ea4fd211390edc25b9928bc73 Mon Sep 17 00:00:00 2001 From: Jelle Raaijmakers Date: Tue, 2 Aug 2022 13:07:19 +0200 Subject: [PATCH] Run: Trigger on escape key only once When you press the escape key in the Browse dialog, the key down event closes the dialog while the key up event then closes the Run window. Prevent this by only listening to key down events. --- Userland/Applications/Run/RunWindow.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Userland/Applications/Run/RunWindow.cpp b/Userland/Applications/Run/RunWindow.cpp index 20c97e80c7..7f89868abc 100644 --- a/Userland/Applications/Run/RunWindow.cpp +++ b/Userland/Applications/Run/RunWindow.cpp @@ -71,7 +71,7 @@ RunWindow::RunWindow() void RunWindow::event(Core::Event& event) { - if (event.type() == GUI::Event::KeyUp || event.type() == GUI::Event::KeyDown) { + if (event.type() == GUI::Event::KeyDown) { auto& key_event = static_cast(event); if (key_event.key() == Key_Escape) { // Escape key pressed, close dialog