LibGUI: Make GDialog accept escape key press events

Anyone who "handles" an event should really also be accepting it.
This commit is contained in:
Andreas Kling 2020-01-21 21:37:22 +01:00
parent 82cb5b6f64
commit a5e482833d
Notes: sideshowbarker 2024-07-19 09:54:33 +09:00

View File

@ -73,6 +73,7 @@ void GDialog::event(CEvent& event)
auto& key_event = static_cast<GKeyEvent&>(event);
if (key_event.key() == KeyCode::Key_Escape) {
done(ExecCancel);
event.accept();
return;
}
}