From 94b2466c028c0563cc858c79cdfc0840e3f9801e Mon Sep 17 00:00:00 2001 From: Michael Aaron Murphy Date: Tue, 9 Dec 2025 17:23:20 +0100 Subject: [PATCH] chore: update cosmic-randr --- Cargo.lock | 119 +++++++----------- cosmic-settings/Cargo.toml | 1 - .../pages/applications/legacy_applications.rs | 4 +- cosmic-settings/src/pages/display/mod.rs | 4 +- 4 files changed, 46 insertions(+), 82 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 3bbe4de..5563b85 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -450,16 +450,6 @@ dependencies = [ "pin-project-lite", ] -[[package]] -name = "async-event" -version = "0.2.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c1222afd3d2bce3995035054046a279ae7aa154d70d0766cea050073f3fd7ddf" -dependencies = [ - "loom", - "pin-project-lite", -] - [[package]] name = "async-executor" version = "1.13.3" @@ -955,6 +945,15 @@ dependencies = [ "syn 2.0.111", ] +[[package]] +name = "branches" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f11502672c5570f77f6bdf573332483f8475bab6a7fda00f1fae8ddb5a6245c0" +dependencies = [ + "rustc_version", +] + [[package]] name = "brotli-decompressor" version = "5.0.0" @@ -1570,7 +1569,7 @@ dependencies = [ [[package]] name = "cosmic-comp-config" version = "0.1.0" -source = "git+https://github.com/pop-os/cosmic-comp#add06102ad7938827c7e223cc32b57eb9c8555fa" +source = "git+https://github.com/pop-os/cosmic-comp#df88a0e1814459bc43c05fd546030269f64639fb" dependencies = [ "cosmic-config", "input", @@ -1708,23 +1707,23 @@ dependencies = [ [[package]] name = "cosmic-randr" version = "0.1.0" -source = "git+https://github.com/pop-os/cosmic-randr#c39fe3fe3573c34ebbdf6d6d7f93ff232800c588" +source = "git+https://github.com/pop-os/cosmic-randr#f5923d1ef58b87ef103abe1a0e44460236d8fa36" dependencies = [ "cosmic-protocols", "futures-lite 2.6.1", "indexmap 2.12.1", - "tachyonix", "thiserror 2.0.17", "tokio", "tracing", "wayland-client", "wayland-protocols-wlr", + "xutex", ] [[package]] name = "cosmic-randr-shell" version = "0.1.0" -source = "git+https://github.com/pop-os/cosmic-randr#c39fe3fe3573c34ebbdf6d6d7f93ff232800c588" +source = "git+https://github.com/pop-os/cosmic-randr#f5923d1ef58b87ef103abe1a0e44460236d8fa36" dependencies = [ "kdl", "slotmap", @@ -1799,7 +1798,6 @@ dependencies = [ "smithay-client-toolkit 0.20.0", "static_init", "sunrise", - "tachyonix", "timedate-zbus", "tokio", "tracing", @@ -2306,16 +2304,6 @@ dependencies = [ "syn 2.0.111", ] -[[package]] -name = "diatomic-waker" -version = "0.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "28025fb55a9d815acf7b0877555f437254f373036eec6ed265116c7a5c0825e9" -dependencies = [ - "loom", - "waker-fn", -] - [[package]] name = "digest" version = "0.9.0" @@ -3055,19 +3043,6 @@ dependencies = [ "slab", ] -[[package]] -name = "generator" -version = "0.7.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5cc16584ff22b460a382b7feec54b23d2908d858152e5739a120b949293bd74e" -dependencies = [ - "cc", - "libc", - "log", - "rustversion", - "windows 0.48.0", -] - [[package]] name = "generic-array" version = "0.14.7" @@ -4022,9 +3997,9 @@ checksum = "f018a98dccf7f0eb02ba06ac0ff67d102d8ded80734724305e924de304e12ff0" [[package]] name = "icu_properties" -version = "2.1.1" +version = "2.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e93fcd3157766c0c8da2f8cff6ce651a31f0810eaa1c51ec363ef790bbb5fb99" +checksum = "020bfc02fe870ec3a66d93e677ccca0562506e5872c650f893269e08615d74ec" dependencies = [ "icu_collections", "icu_locale_core", @@ -4037,9 +4012,9 @@ dependencies = [ [[package]] name = "icu_properties_data" -version = "2.1.1" +version = "2.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "02845b3647bb045f1100ecd6480ff52f34c35f82d9880e029d329c21d1054899" +checksum = "616c294cf8d725c6afcd8f55abc17c56464ef6211f9ed59cccffe534129c77af" [[package]] name = "icu_provider" @@ -4911,19 +4886,6 @@ version = "0.4.29" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5e5032e24019045c762d3c0f28f5b6b8bbf38563a65908389bf7978758920897" -[[package]] -name = "loom" -version = "0.5.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ff50ecb28bb86013e935fb6683ab1f6d3a20016f123c76fd4c27470076ac30f5" -dependencies = [ - "cfg-if", - "generator", - "scoped-tls", - "tracing", - "tracing-subscriber", -] - [[package]] name = "loop9" version = "0.1.5" @@ -6841,6 +6803,15 @@ version = "2.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "357703d41365b4b27c590e3ed91eabb1b663f07c4c084095e60cbed4362dff0d" +[[package]] +name = "rustc_version" +version = "0.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cfcb3a22ef46e85b45de6ee7e79d063319ebb6594faafcf1c225ea92ab6e9b92" +dependencies = [ + "semver", +] + [[package]] name = "rustix" version = "0.37.28" @@ -6989,6 +6960,12 @@ version = "1.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "16c2f82143577edb4921b71ede051dac62ca3c16084e918bf7b40c96ae10eb33" +[[package]] +name = "semver" +version = "1.0.27" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d767eb0aabc880b29956c35734170f26ed551a859dbd361d140cdbeca61ab1e2" + [[package]] name = "serde" version = "1.0.228" @@ -7545,19 +7522,6 @@ dependencies = [ "version-compare", ] -[[package]] -name = "tachyonix" -version = "0.3.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "86c3eafa053bbcc63bb4bfc5eb26362a33ea0bc2e589f28bce00287d1c167d45" -dependencies = [ - "async-event", - "crossbeam-utils", - "diatomic-waker", - "futures-core", - "pin-project-lite", -] - [[package]] name = "taffy" version = "0.9.2" @@ -8672,15 +8636,6 @@ dependencies = [ "thiserror 1.0.69", ] -[[package]] -name = "windows" -version = "0.48.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e686886bc078bc1b0b600cac0147aadb815089b6e4da64016cbd754b6342700f" -dependencies = [ - "windows-targets 0.48.5", -] - [[package]] name = "windows" version = "0.52.0" @@ -9447,6 +9402,16 @@ version = "0.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ec7a2a501ed189703dba8b08142f057e887dfc4b2cc4db2d343ac6376ba3e0b9" +[[package]] +name = "xutex" +version = "0.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8f7b2794adabee656fae931dc27d457c4e8a83cfe96ad1e1c73de770b8401b57" +dependencies = [ + "branches", + "crossbeam-queue", +] + [[package]] name = "y4m" version = "0.8.0" diff --git a/cosmic-settings/Cargo.toml b/cosmic-settings/Cargo.toml index 43ece91..a27ab23 100644 --- a/cosmic-settings/Cargo.toml +++ b/cosmic-settings/Cargo.toml @@ -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" diff --git a/cosmic-settings/src/pages/applications/legacy_applications.rs b/cosmic-settings/src/pages/applications/legacy_applications.rs index 93ca01c..1d97bde 100644 --- a/cosmic-settings/src/pages/applications/legacy_applications.rs +++ b/cosmic-settings/src/pages/applications/legacy_applications.rs @@ -112,7 +112,7 @@ impl page::Page 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 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) { diff --git a/cosmic-settings/src/pages/display/mod.rs b/cosmic-settings/src/pages/display/mod.rs index 4a0db76..23e810a 100644 --- a/cosmic-settings/src/pages/display/mod.rs +++ b/cosmic-settings/src/pages/display/mod.rs @@ -261,7 +261,7 @@ impl page::Page 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 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) {