mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-11-22 23:50:19 +00:00
Kernel: Defer handling of key press events in VirtualConsole
Trying to pass these onto the Terminal while handling an IRQ is a recipe for disaster. Use Processor::deferred_call_queue to create an ad-hoc "second half" of the interrupt handler. Fixes #4889
This commit is contained in:
parent
d8aed14dba
commit
a5e557472c
Notes:
sideshowbarker
2024-07-18 23:57:19 +09:00
Author: https://github.com/ADKaster Commit: https://github.com/SerenityOS/serenity/commit/a5e557472cc Pull-request: https://github.com/SerenityOS/serenity/pull/4891 Issue: https://github.com/SerenityOS/serenity/issues/4889
1 changed files with 3 additions and 1 deletions
|
@ -238,7 +238,9 @@ void VirtualConsole::on_key_pressed(KeyboardDevice::Event event)
|
|||
return;
|
||||
}
|
||||
|
||||
m_terminal.handle_key_press(event.key, event.code_point, event.flags);
|
||||
Processor::deferred_call_queue([this, event]() {
|
||||
m_terminal.handle_key_press(event.key, event.code_point, event.flags);
|
||||
});
|
||||
}
|
||||
|
||||
ssize_t VirtualConsole::on_tty_write(const UserOrKernelBuffer& data, ssize_t size)
|
||||
|
|
Loading…
Reference in a new issue