chore: updates after iced-rebase
This commit is contained in:
parent
bd0d180482
commit
71d9d6d5bb
41 changed files with 1786 additions and 2396 deletions
|
|
@ -13,7 +13,7 @@ use cctk::{
|
|||
};
|
||||
use cosmic::{
|
||||
iced::{self, Subscription, stream},
|
||||
iced_core::image::Bytes,
|
||||
iced_core::Bytes,
|
||||
};
|
||||
use image::EncodableLayout;
|
||||
|
||||
|
|
@ -31,16 +31,15 @@ pub static WAYLAND_RX: LazyLock<Mutex<Option<UnboundedReceiver<WaylandUpdate>>>>
|
|||
LazyLock::new(|| Mutex::new(None));
|
||||
|
||||
pub fn wayland_subscription() -> iced::Subscription<WaylandUpdate> {
|
||||
Subscription::run_with_id(
|
||||
std::any::TypeId::of::<WaylandUpdate>(),
|
||||
Subscription::run_with(std::any::TypeId::of::<WaylandUpdate>(), |_| {
|
||||
stream::channel(50, move |mut output| async move {
|
||||
let mut state = State::Waiting;
|
||||
|
||||
loop {
|
||||
state = start_listening(state, &mut output).await;
|
||||
}
|
||||
}),
|
||||
)
|
||||
})
|
||||
})
|
||||
}
|
||||
|
||||
pub enum State {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue