mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-01-07 19:57:45 +03: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
@ -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…
Reference in New Issue
Block a user