Skip to content

Commit

Permalink
fix: add back the window id to the frames subscription
Browse files Browse the repository at this point in the history
  • Loading branch information
wash2 committed Nov 30, 2023
1 parent c9de9eb commit 9af6bbb
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions runtime/src/window.rs
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,11 @@ use crate::futures::Subscription;
///
/// In any case, this [`Subscription`] is useful to smoothly draw application-driven
/// animations without missing any frames.
pub fn frames() -> Subscription<Instant> {
pub fn frames() -> Subscription<(Id, Instant)> {
event::listen_raw(|event, _status| match event {
iced_core::Event::Window(_, Event::RedrawRequested(at)) => Some(at),
iced_core::Event::Window(id, Event::RedrawRequested(at)) => {
Some((id, at))
}
_ => None,
})
}
Expand Down

0 comments on commit 9af6bbb

Please sign in to comment.