mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-04-21 20:15:17 +00:00
LibGUI: Make GDialog accept escape key press events
Anyone who "handles" an event should really also be accepting it.
This commit is contained in:
parent
82cb5b6f64
commit
a5e482833d
Notes:
sideshowbarker
2024-07-19 09:54:33 +09:00
Author: https://github.com/awesomekling Commit: https://github.com/SerenityOS/serenity/commit/a5e482833d4
1 changed files with 1 additions and 0 deletions
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue