mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 06:17:35 +00:00
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.
This commit is contained in:
parent
c72482da54
commit
379c7c2f64
1 changed files with 1 additions and 1 deletions
|
@ -71,7 +71,7 @@ RunWindow::RunWindow()
|
||||||
|
|
||||||
void RunWindow::event(Core::Event& event)
|
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);
|
auto& key_event = static_cast<GUI::KeyEvent&>(event);
|
||||||
if (key_event.key() == Key_Escape) {
|
if (key_event.key() == Key_Escape) {
|
||||||
// Escape key pressed, close dialog
|
// Escape key pressed, close dialog
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue