Draft Shell:request_redraw API
... and implement `TextInput` cursor blink 🎉
This commit is contained in:
parent
7ccd87c36b
commit
7354f68b3c
12 changed files with 267 additions and 111 deletions
|
|
@ -1,5 +1,6 @@
|
|||
//! Listen to external events in your application.
|
||||
use crate::event::{self, Event};
|
||||
use crate::window;
|
||||
use crate::Hasher;
|
||||
|
||||
use iced_futures::futures::{self, Future, Stream};
|
||||
|
|
@ -33,7 +34,7 @@ pub type Tracker =
|
|||
|
||||
pub use iced_futures::subscription::Recipe;
|
||||
|
||||
/// Returns a [`Subscription`] to all the runtime events.
|
||||
/// Returns a [`Subscription`] to all the ignored runtime events.
|
||||
///
|
||||
/// This subscription will notify your application of any [`Event`] that was
|
||||
/// not captured by any widget.
|
||||
|
|
@ -65,7 +66,10 @@ where
|
|||
use futures::stream::StreamExt;
|
||||
|
||||
events.filter_map(move |(event, status)| {
|
||||
future::ready(f(event, status))
|
||||
future::ready(match event {
|
||||
Event::Window(window::Event::RedrawRequested(_)) => None,
|
||||
_ => f(event, status),
|
||||
})
|
||||
})
|
||||
},
|
||||
})
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue