Skip to content

Commit

Permalink
fix: include id in frames
Browse files Browse the repository at this point in the history
  • Loading branch information
wash2 committed Oct 3, 2024
1 parent c897adf commit b27f2eb
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions runtime/src/window.rs
Original file line number Diff line number Diff line change
Expand Up @@ -169,9 +169,11 @@ pub enum Action {
///
/// In any case, this [`Subscription`] is useful to smoothly draw application-driven
/// animations without missing any frames.
pub fn frames() -> Subscription<Instant> {
event::listen_raw(|event, _status, _window| match event {
crate::core::Event::Window(Event::RedrawRequested(at)) => Some(at),
pub fn frames() -> Subscription<(Id, Instant)> {
event::listen_raw(|event, _status, window| match event {
crate::core::Event::Window(Event::RedrawRequested(at)) => {
Some((window, at))
}
_ => None,
})
}
Expand Down

0 comments on commit b27f2eb

Please sign in to comment.