mirror of
https://github.com/servo/servo.git
synced 2025-08-02 12:10:29 +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
|
@ -91,9 +91,7 @@ impl ScriptListener for Box<CompositorProxy+'static+Send> {
|
|||
}
|
||||
|
||||
fn send_key_event(&mut self, key: Key, state: KeyState, modifiers: KeyModifiers) {
|
||||
if state == KeyState::Pressed {
|
||||
self.send(Msg::KeyEvent(key, modifiers));
|
||||
}
|
||||
self.send(Msg::KeyEvent(key, state, modifiers));
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -218,7 +216,7 @@ pub enum Msg {
|
|||
/// composite should happen. (See the `scrolling` module.)
|
||||
ScrollTimeout(u64),
|
||||
/// Sends an unconsumed key event back to the compositor.
|
||||
KeyEvent(Key, KeyModifiers),
|
||||
KeyEvent(Key, KeyState, KeyModifiers),
|
||||
/// Changes the cursor.
|
||||
SetCursor(Cursor),
|
||||
/// Informs the compositor that the paint task for the given pipeline has exited.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue