Introduce window::Id to Event subscriptions
And remove `window::Id` from `Event` altogether.
This commit is contained in:
parent
49affc44ff
commit
e400f972c1
19 changed files with 95 additions and 91 deletions
|
|
@ -145,11 +145,11 @@ impl Example {
|
|||
}
|
||||
|
||||
fn subscription(&self) -> Subscription<Message> {
|
||||
event::listen_with(|event, _| match event {
|
||||
event::listen_with(|event, _status, _window| match event {
|
||||
Event::Mouse(mouse::Event::CursorMoved { position }) => {
|
||||
Some(Message::MouseMoved(position))
|
||||
}
|
||||
Event::Window(_, window::Event::Resized { .. }) => {
|
||||
Event::Window(window::Event::Resized { .. }) => {
|
||||
Some(Message::WindowResized)
|
||||
}
|
||||
_ => None,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue