summaryrefslogtreecommitdiff
path: root/Userland/Applications/Run/RunWindow.cpp
diff options
context:
space:
mode:
authorJelle Raaijmakers <jelle@gmta.nl>2022-08-02 13:07:19 +0200
committerLinus Groh <mail@linusgroh.de>2022-08-02 12:54:39 +0100
commit379c7c2f646ccf7ea4fd211390edc25b9928bc73 (patch)
tree723c2df6e5818c48c778ef070b2dbbe7eb923eaa /Userland/Applications/Run/RunWindow.cpp
parentc72482da54d809a0bd7abd6ed05647780aa897c1 (diff)
downloadserenity-379c7c2f646ccf7ea4fd211390edc25b9928bc73.zip
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.
Diffstat (limited to 'Userland/Applications/Run/RunWindow.cpp')
-rw-r--r--Userland/Applications/Run/RunWindow.cpp2
1 files changed, 1 insertions, 1 deletions
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<GUI::KeyEvent&>(event);
if (key_event.key() == Key_Escape) {
// Escape key pressed, close dialog