Merge branch 'master' into feat/multi-window-support

This commit is contained in:
Héctor Ramón Jiménez 2023-11-29 22:28:31 +01:00
commit e09b4e24dd
No known key found for this signature in database
GPG key ID: 7CC46565708259A7
331 changed files with 12085 additions and 3976 deletions

View file

@ -11,7 +11,8 @@ use crate::command::{self, Command};
use crate::core::time::Instant;
use crate::core::window::{self, Event, Icon, Level, Mode, UserAttention};
use crate::core::Size;
use crate::futures::subscription::{self, Subscription};
use crate::futures::event;
use crate::futures::Subscription;
/// Subscribes to the frames of the window of the running application.
///
@ -22,8 +23,8 @@ use crate::futures::subscription::{self, Subscription};
/// In any case, this [`Subscription`] is useful to smoothly draw application-driven
/// animations without missing any frames.
pub fn frames() -> Subscription<Instant> {
subscription::raw_events(|event, _status| match event {
iced_core::Event::Window(_, Event::RedrawRequested(at)) => Some(at),
event::listen_raw(|event, _status| match event {
crate::core::Event::Window(_, Event::RedrawRequested(at)) => Some(at),
_ => None,
})
}