New iced changes
This commit is contained in:
parent
70d487ba20
commit
7e9a12a4aa
4 changed files with 6 additions and 5 deletions
|
|
@ -70,7 +70,7 @@ where
|
|||
|
||||
events.filter_map(move |(event, status)| {
|
||||
future::ready(match event {
|
||||
Event::Window(window::Event::RedrawRequested(_)) => None,
|
||||
Event::Window(_, window::Event::RedrawRequested(_)) => None,
|
||||
_ => f(event, status),
|
||||
})
|
||||
})
|
||||
|
|
|
|||
|
|
@ -782,7 +782,7 @@ where
|
|||
|
||||
state.keyboard_modifiers = modifiers;
|
||||
}
|
||||
Event::Window(window::Event::RedrawRequested(now)) => {
|
||||
Event::Window(_, window::Event::RedrawRequested(now)) => {
|
||||
let state = state();
|
||||
|
||||
if let Some(focus) = &mut state.is_focused {
|
||||
|
|
|
|||
|
|
@ -5,8 +5,8 @@ mod icon;
|
|||
mod id;
|
||||
mod mode;
|
||||
mod position;
|
||||
mod settings;
|
||||
mod redraw_request;
|
||||
mod settings;
|
||||
mod user_attention;
|
||||
|
||||
pub use action::Action;
|
||||
|
|
@ -15,8 +15,8 @@ pub use icon::Icon;
|
|||
pub use id::Id;
|
||||
pub use mode::Mode;
|
||||
pub use position::Position;
|
||||
pub use settings::Settings;
|
||||
pub use redraw_request::RedrawRequest;
|
||||
pub use settings::Settings;
|
||||
pub use user_attention::UserAttention;
|
||||
|
||||
use crate::subscription::{self, Subscription};
|
||||
|
|
@ -32,7 +32,7 @@ use crate::time::Instant;
|
|||
/// animations without missing any frames.
|
||||
pub fn frames() -> Subscription<Instant> {
|
||||
subscription::raw_events(|event, _status| match event {
|
||||
crate::Event::Window(Event::RedrawRequested(at)) => Some(at),
|
||||
crate::Event::Window(_, Event::RedrawRequested(at)) => Some(at),
|
||||
_ => None,
|
||||
})
|
||||
}
|
||||
|
|
|
|||
|
|
@ -402,6 +402,7 @@ async fn run_instance<A, E, C>(
|
|||
// Then, we can use the `interface_state` here to decide if a redraw
|
||||
// is needed right away, or simply wait until a specific time.
|
||||
let redraw_event = Event::Window(
|
||||
crate::window::Id::MAIN,
|
||||
crate::window::Event::RedrawRequested(Instant::now()),
|
||||
);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue