mirror of
https://github.com/servo/servo.git
synced 2025-08-05 21:50:18 +01:00
Changed Msg::KeyEvent to take in KeyState and moved the checks in CompositorTask::send_key_event to Compositor::handle_browser_message
This commit is contained in:
parent
b262fc16e0
commit
37cb876f4e
3 changed files with 7 additions and 7 deletions
|
@ -358,8 +358,10 @@ impl<Window: WindowMethods> IOCompositor<Window> {
|
|||
}
|
||||
}
|
||||
|
||||
(Msg::KeyEvent(key, modified), ShutdownState::NotShuttingDown) => {
|
||||
self.window.handle_key(key, modified);
|
||||
(Msg::KeyEvent(key, state, modified), ShutdownState::NotShuttingDown) => {
|
||||
if state == KeyState::Pressed {
|
||||
self.window.handle_key(key, modified);
|
||||
}
|
||||
}
|
||||
|
||||
(Msg::SetCursor(cursor), ShutdownState::NotShuttingDown) => {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue