chore: update cosmic-randr

This commit is contained in:
Michael Aaron Murphy 2025-12-09 17:23:20 +01:00 committed by Ashley Wulber
parent 7c79b263d6
commit 94b2466c02
4 changed files with 46 additions and 82 deletions

View file

@ -68,7 +68,6 @@ slab = "0.4.11"
slotmap = "1.0.7"
static_init = "1.0.4"
sunrise = "2.1.0"
tachyonix = "0.3.1"
timedate-zbus = { git = "https://github.com/pop-os/dbus-settings-bindings", optional = true }
tokio = { workspace = true, features = ["fs", "io-util", "sync"] }
tracing = "0.1.41"

View file

@ -112,7 +112,7 @@ impl page::Page<crate::pages::Message> for Page {
tasks.push(cosmic::task::future(on_enter()));
let refresh_pending = self.refresh_pending.clone();
let (tx, mut rx) = tachyonix::channel(4);
let (tx, mut rx) = cosmic_randr::channel();
let (canceller, cancelled) = oneshot::channel::<()>();
let runtime = tokio::runtime::Handle::current();
@ -137,7 +137,7 @@ impl page::Page<crate::pages::Message> for Page {
// Forward messages from another thread to prevent the monitoring thread from blocking.
let (randr_task, randr_handle) =
Task::stream(async_fn_stream::fn_stream(|emitter| async move {
while let Ok(message) = rx.recv().await {
while let Some(message) = rx.recv().await {
if let cosmic_randr::Message::ManagerDone = message
&& !refresh_pending.swap(true, Ordering::SeqCst)
{

View file

@ -261,7 +261,7 @@ impl page::Page<crate::pages::Message> for Page {
#[cfg(feature = "wayland")]
{
let refreshing_page = self.refreshing_page.clone();
let (tx, mut rx) = tachyonix::channel(4);
let (tx, mut rx) = cosmic_randr::channel();
let (canceller, cancelled) = oneshot::channel::<()>();
let runtime = tokio::runtime::Handle::current();
@ -286,7 +286,7 @@ impl page::Page<crate::pages::Message> for Page {
// Forward messages from another thread to prevent the monitoring thread from blocking.
let (randr_task, randr_handle) =
Task::stream(async_fn_stream::fn_stream(|emitter| async move {
while let Ok(message) = rx.recv().await {
while let Some(message) = rx.recv().await {
if let cosmic_randr::Message::ManagerDone = message
&& !refreshing_page.swap(true, Ordering::SeqCst)
{