forge
Explore
Log in

Don't you dare go Hollow

Upgrade `zbus` and `async-io`

Browse files at this commit

0113292cf6a77aea55739c7e779a891786aa35bdbbb651Parent: 4741ab2
Cargo.lockmodified+186 -20
@@ -183,6 +183,18 @@ dependencies = [
183183 "futures-core",
184184 ]
185185
186+[[package]]
187+name = "async-broadcast"
188+version = "0.7.1"
189+source = "registry+https://github.com/rust-lang/crates.io-index"
190+checksum = "20cd0e2e25ea8e5f7e9df04578dc6cf5c83577fd09b1a46aaf5c85e1c33f2a7e"
191+dependencies = [
192+ "event-listener 5.3.1",
193+ "event-listener-strategy",
194+ "futures-core",
195+ "pin-project-lite",
196+]
197+
186198 [[package]]
187199 name = "async-channel"
188200 version = "2.3.1"
@@ -220,6 +232,17 @@ dependencies = [
220232 "futures-lite 1.13.0",
221233 ]
222234
235+[[package]]
236+name = "async-fs"
237+version = "2.1.2"
238+source = "registry+https://github.com/rust-lang/crates.io-index"
239+checksum = "ebcd09b382f40fcd159c2d695175b2ae620ffa5f3bd6f664131efff4e8b9e04a"
240+dependencies = [
241+ "async-lock 3.4.0",
242+ "blocking",
243+ "futures-lite 2.3.0",
244+]
245+
223246 [[package]]
224247 name = "async-io"
225248 version = "1.13.0"
@@ -242,9 +265,9 @@ dependencies = [
242265
243266 [[package]]
244267 name = "async-io"
245-version = "2.3.4"
268+version = "2.4.0"
246269 source = "registry+https://github.com/rust-lang/crates.io-index"
247-checksum = "444b0228950ee6501b3568d3c93bf1176a1fdbc3b758dcd9475046d30f4dc7e8"
270+checksum = "43a2b323ccce0a1d90b449fd71f2a06ca7faa7c54c2751f06c9bd851fc061059"
248271 dependencies = [
249272 "async-lock 3.4.0",
250273 "cfg-if",
@@ -296,6 +319,25 @@ dependencies = [
296319 "windows-sys 0.48.0",
297320 ]
298321
322+[[package]]
323+name = "async-process"
324+version = "2.3.0"
325+source = "registry+https://github.com/rust-lang/crates.io-index"
326+checksum = "63255f1dc2381611000436537bbedfe83183faa303a5a0edaf191edef06526bb"
327+dependencies = [
328+ "async-channel",
329+ "async-io 2.4.0",
330+ "async-lock 3.4.0",
331+ "async-signal",
332+ "async-task",
333+ "blocking",
334+ "cfg-if",
335+ "event-listener 5.3.1",
336+ "futures-lite 2.3.0",
337+ "rustix 0.38.38",
338+ "tracing",
339+]
340+
299341 [[package]]
300342 name = "async-recursion"
301343 version = "1.1.1"
@@ -313,7 +355,7 @@ version = "0.2.10"
313355 source = "registry+https://github.com/rust-lang/crates.io-index"
314356 checksum = "637e00349800c0bdf8bfc21ebbc0b6524abea702b0da4168ac00d070d0c0b9f3"
315357 dependencies = [
316- "async-io 2.3.4",
358+ "async-io 2.4.0",
317359 "async-lock 3.4.0",
318360 "atomic-waker",
319361 "cfg-if",
@@ -817,9 +859,9 @@ dependencies = [
817859
818860 [[package]]
819861 name = "cpufeatures"
820-version = "0.2.14"
862+version = "0.2.16"
821863 source = "registry+https://github.com/rust-lang/crates.io-index"
822-checksum = "608697df725056feaccfa42cffdaeeec3fccc4ffc38358ecd19b243e716a78e0"
864+checksum = "16b80225097f2e5ae4e7179dd2266824648f3e2f49d9134d584b76389d31c4c3"
823865 dependencies = [
824866 "libc",
825867 ]
@@ -1057,6 +1099,12 @@ version = "1.0.0"
10571099 source = "registry+https://github.com/rust-lang/crates.io-index"
10581100 checksum = "34aa73646ffb006b8f5147f3dc182bd4bcb190227ce861fc4a4844bf8e3cb2c0"
10591101
1102+[[package]]
1103+name = "endi"
1104+version = "1.1.0"
1105+source = "registry+https://github.com/rust-lang/crates.io-index"
1106+checksum = "a3d8a32ae18130a3c84dd492d4215c3d913c3b07c6b63c2eb3eb7ff1101ab7bf"
1107+
10601108 [[package]]
10611109 name = "enumflags2"
10621110 version = "0.7.10"
@@ -2436,7 +2484,7 @@ dependencies = [
24362484 "approx 0.5.1",
24372485 "arrayvec",
24382486 "async-channel",
2439- "async-io 1.13.0",
2487+ "async-io 2.4.0",
24402488 "atomic",
24412489 "bitflags 2.6.0",
24422490 "bytemuck",
@@ -2482,7 +2530,7 @@ dependencies = [
24822530 "wayland-scanner",
24832531 "xcursor",
24842532 "xshell",
2485- "zbus",
2533+ "zbus 5.2.0",
24862534 ]
24872535
24882536 [[package]]
@@ -2549,6 +2597,19 @@ dependencies = [
25492597 "libc",
25502598 ]
25512599
2600+[[package]]
2601+name = "nix"
2602+version = "0.29.0"
2603+source = "registry+https://github.com/rust-lang/crates.io-index"
2604+checksum = "71e2746dc3a24dd78b3cfcb7be93368c6de9963d30f43a6a73998a9cf4b17b46"
2605+dependencies = [
2606+ "bitflags 2.6.0",
2607+ "cfg-if",
2608+ "cfg_aliases",
2609+ "libc",
2610+ "memoffset 0.9.1",
2611+]
2612+
25522613 [[package]]
25532614 name = "nom"
25542615 version = "7.1.3"
@@ -2569,7 +2630,7 @@ dependencies = [
25692630 "mac-notification-sys",
25702631 "serde",
25712632 "tauri-winrt-notification",
2572- "zbus",
2633+ "zbus 3.15.2",
25732634 ]
25742635
25752636 [[package]]
@@ -4011,9 +4072,9 @@ dependencies = [
40114072
40124073 [[package]]
40134074 name = "time"
4014-version = "0.3.36"
4075+version = "0.3.37"
40154076 source = "registry+https://github.com/rust-lang/crates.io-index"
4016-checksum = "5dfd88e563464686c916c7e46e623e520ddc6d79fa6641390f2e3fa86e83e885"
4077+checksum = "35e7868883861bd0e56d9ac6efcaaca0d6d5d82a2a7ec8209ff492c07cf37b21"
40174078 dependencies = [
40184079 "deranged",
40194080 "num-conv",
@@ -5092,12 +5153,12 @@ version = "3.15.2"
50925153 source = "registry+https://github.com/rust-lang/crates.io-index"
50935154 checksum = "675d170b632a6ad49804c8cf2105d7c31eddd3312555cffd4b740e08e97c25e6"
50945155 dependencies = [
5095- "async-broadcast",
5156+ "async-broadcast 0.5.1",
50965157 "async-executor",
5097- "async-fs",
5158+ "async-fs 1.6.0",
50985159 "async-io 1.13.0",
50995160 "async-lock 2.8.0",
5100- "async-process",
5161+ "async-process 1.8.1",
51015162 "async-recursion",
51025163 "async-task",
51035164 "async-trait",
@@ -5122,9 +5183,45 @@ dependencies = [
51225183 "uds_windows",
51235184 "winapi",
51245185 "xdg-home",
5125- "zbus_macros",
5126- "zbus_names",
5127- "zvariant",
5186+ "zbus_macros 3.15.2",
5187+ "zbus_names 2.6.1",
5188+ "zvariant 3.15.2",
5189+]
5190+
5191+[[package]]
5192+name = "zbus"
5193+version = "5.2.0"
5194+source = "registry+https://github.com/rust-lang/crates.io-index"
5195+checksum = "fb67eadba43784b6fb14857eba0d8fc518686d3ee537066eb6086dc318e2c8a1"
5196+dependencies = [
5197+ "async-broadcast 0.7.1",
5198+ "async-executor",
5199+ "async-fs 2.1.2",
5200+ "async-io 2.4.0",
5201+ "async-lock 3.4.0",
5202+ "async-process 2.3.0",
5203+ "async-recursion",
5204+ "async-task",
5205+ "async-trait",
5206+ "blocking",
5207+ "enumflags2",
5208+ "event-listener 5.3.1",
5209+ "futures-core",
5210+ "futures-util",
5211+ "hex",
5212+ "nix 0.29.0",
5213+ "ordered-stream",
5214+ "serde",
5215+ "serde_repr",
5216+ "static_assertions",
5217+ "tracing",
5218+ "uds_windows",
5219+ "windows-sys 0.59.0",
5220+ "winnow 0.6.20",
5221+ "xdg-home",
5222+ "zbus_macros 5.2.0",
5223+ "zbus_names 4.1.0",
5224+ "zvariant 5.1.0",
51285225 ]
51295226
51305227 [[package]]
@@ -5138,7 +5235,22 @@ dependencies = [
51385235 "quote",
51395236 "regex",
51405237 "syn 1.0.109",
5141- "zvariant_utils",
5238+ "zvariant_utils 1.0.1",
5239+]
5240+
5241+[[package]]
5242+name = "zbus_macros"
5243+version = "5.2.0"
5244+source = "registry+https://github.com/rust-lang/crates.io-index"
5245+checksum = "2c9d49ebc960ceb660f2abe40a5904da975de6986f2af0d7884b39eec6528c57"
5246+dependencies = [
5247+ "proc-macro-crate 3.2.0",
5248+ "proc-macro2",
5249+ "quote",
5250+ "syn 2.0.86",
5251+ "zbus_names 4.1.0",
5252+ "zvariant 5.1.0",
5253+ "zvariant_utils 3.0.2",
51425254 ]
51435255
51445256 [[package]]
@@ -5149,7 +5261,19 @@ checksum = "437d738d3750bed6ca9b8d423ccc7a8eb284f6b1d6d4e225a0e4e6258d864c8d"
51495261 dependencies = [
51505262 "serde",
51515263 "static_assertions",
5152- "zvariant",
5264+ "zvariant 3.15.2",
5265+]
5266+
5267+[[package]]
5268+name = "zbus_names"
5269+version = "4.1.0"
5270+source = "registry+https://github.com/rust-lang/crates.io-index"
5271+checksum = "856b7a38811f71846fd47856ceee8bccaec8399ff53fb370247e66081ace647b"
5272+dependencies = [
5273+ "serde",
5274+ "static_assertions",
5275+ "winnow 0.6.20",
5276+ "zvariant 5.1.0",
51535277 ]
51545278
51555279 [[package]]
@@ -5227,7 +5351,22 @@ dependencies = [
52275351 "libc",
52285352 "serde",
52295353 "static_assertions",
5230- "zvariant_derive",
5354+ "zvariant_derive 3.15.2",
5355+]
5356+
5357+[[package]]
5358+name = "zvariant"
5359+version = "5.1.0"
5360+source = "registry+https://github.com/rust-lang/crates.io-index"
5361+checksum = "a1200ee6ac32f1e5a312e455a949a4794855515d34f9909f4a3e082d14e1a56f"
5362+dependencies = [
5363+ "endi",
5364+ "enumflags2",
5365+ "serde",
5366+ "static_assertions",
5367+ "winnow 0.6.20",
5368+ "zvariant_derive 5.1.0",
5369+ "zvariant_utils 3.0.2",
52315370 ]
52325371
52335372 [[package]]
@@ -5240,7 +5379,20 @@ dependencies = [
52405379 "proc-macro2",
52415380 "quote",
52425381 "syn 1.0.109",
5243- "zvariant_utils",
5382+ "zvariant_utils 1.0.1",
5383+]
5384+
5385+[[package]]
5386+name = "zvariant_derive"
5387+version = "5.1.0"
5388+source = "registry+https://github.com/rust-lang/crates.io-index"
5389+checksum = "687e3b97fae6c9104fbbd36c73d27d149abf04fb874e2efbd84838763daa8916"
5390+dependencies = [
5391+ "proc-macro-crate 3.2.0",
5392+ "proc-macro2",
5393+ "quote",
5394+ "syn 2.0.86",
5395+ "zvariant_utils 3.0.2",
52445396 ]
52455397
52465398 [[package]]
@@ -5253,3 +5405,17 @@ dependencies = [
52535405 "quote",
52545406 "syn 1.0.109",
52555407 ]
5408+
5409+[[package]]
5410+name = "zvariant_utils"
5411+version = "3.0.2"
5412+source = "registry+https://github.com/rust-lang/crates.io-index"
5413+checksum = "20d1d011a38f12360e5fcccceeff5e2c42a8eb7f27f0dcba97a0862ede05c9c6"
5414+dependencies = [
5415+ "proc-macro2",
5416+ "quote",
5417+ "serde",
5418+ "static_assertions",
5419+ "syn 2.0.86",
5420+ "winnow 0.6.20",
5421+]
Cargo.tomlmodified+2 -2
@@ -48,7 +48,7 @@ keywords = ["wayland", "compositor", "tiling", "smithay", "wm"]
4848 anyhow.workspace = true
4949 arrayvec = "0.7.6"
5050 async-channel = "2.3.1"
51-async-io = { version = "1.13.0", optional = true }
51+async-io = { version = "2.4.0", optional = true }
5252 atomic = "0.6.0"
5353 bitflags.workspace = true
5454 bytemuck = { version = "1.19.0", features = ["derive"] }
@@ -86,7 +86,7 @@ url = { version = "2.5.3", optional = true }
8686 wayland-backend = "0.3.7"
8787 wayland-scanner = "0.31.5"
8888 xcursor = "0.3.8"
89-zbus = { version = "~3.15.2", optional = true }
89+zbus = { version = "5.2.0", optional = true }
9090
9191 [dependencies.smithay]
9292 workspace = true
src/dbus/freedesktop_screensaver.rsmodified+5 -4
@@ -6,9 +6,10 @@ use std::sync::{Arc, Mutex, OnceLock};
66 use anyhow::Context;
77 use futures_util::StreamExt;
88 use zbus::fdo::{self, RequestNameFlags};
9+use zbus::message::Header;
910 use zbus::names::{OwnedUniqueName, UniqueName};
1011 use zbus::zvariant::NoneValue;
11-use zbus::{dbus_interface, MessageHeader, Task};
12+use zbus::{interface, Task};
1213
1314 use super::Start;
1415
@@ -20,11 +21,11 @@ pub struct ScreenSaver {
2021 monitor_task: Arc<OnceLock<Task<()>>>,
2122 }
2223
23-#[dbus_interface(name = "org.freedesktop.ScreenSaver")]
24+#[interface(name = "org.freedesktop.ScreenSaver")]
2425 impl ScreenSaver {
2526 async fn inhibit(
2627 &mut self,
27- #[zbus(header)] hdr: MessageHeader<'_>,
28+ #[zbus(header)] hdr: Header<'_>,
2829 application_name: &str,
2930 reason_for_inhibit: &str,
3031 ) -> fdo::Result<u32> {
@@ -33,7 +34,7 @@ impl ScreenSaver {
3334 hdr.sender()
3435 );
3536
36- let Ok(Some(name)) = hdr.sender() else {
37+ let Some(name) = hdr.sender() else {
3738 return Err(fdo::Error::Failed(String::from("no sender")));
3839 };
3940 let name = OwnedUniqueName::from(name.to_owned());
src/dbus/gnome_shell_introspect.rsmodified+5 -4
@@ -1,8 +1,9 @@
11 use std::collections::HashMap;
22
33 use zbus::fdo::{self, RequestNameFlags};
4+use zbus::interface;
5+use zbus::object_server::SignalEmitter;
46 use zbus::zvariant::{SerializeDict, Type, Value};
5-use zbus::{dbus_interface, SignalContext};
67
78 use super::Start;
89
@@ -33,7 +34,7 @@ pub struct WindowProperties {
3334 pub app_id: String,
3435 }
3536
36-#[dbus_interface(name = "org.gnome.Shell.Introspect")]
37+#[interface(name = "org.gnome.Shell.Introspect")]
3738 impl Introspect {
3839 async fn get_windows(&self) -> fdo::Result<HashMap<u64, WindowProperties>> {
3940 if let Err(err) = self.to_niri.send(IntrospectToNiri::GetWindows) {
@@ -52,8 +53,8 @@ impl Introspect {
5253
5354 // FIXME: call this upon window changes, once more of the infrastructure is there (will be
5455 // needed for the event stream IPC anyway).
55- #[dbus_interface(signal)]
56- pub async fn windows_changed(ctxt: &SignalContext<'_>) -> zbus::Result<()>;
56+ #[zbus(signal)]
57+ pub async fn windows_changed(ctxt: &SignalEmitter<'_>) -> zbus::Result<()>;
5758 }
5859
5960 impl Introspect {
src/dbus/gnome_shell_screenshot.rsmodified+2 -2
@@ -1,7 +1,7 @@
11 use std::path::PathBuf;
22
3-use zbus::dbus_interface;
43 use zbus::fdo::{self, RequestNameFlags};
4+use zbus::interface;
55
66 use super::Start;
77
@@ -18,7 +18,7 @@ pub enum NiriToScreenshot {
1818 ScreenshotResult(Option<PathBuf>),
1919 }
2020
21-#[dbus_interface(name = "org.gnome.Shell.Screenshot")]
21+#[interface(name = "org.gnome.Shell.Screenshot")]
2222 impl Screenshot {
2323 async fn screenshot(
2424 &self,
src/dbus/mod.rsmodified+1 -1
@@ -1,5 +1,5 @@
11 use zbus::blocking::Connection;
2-use zbus::Interface;
2+use zbus::object_server::Interface;
33
44 use crate::niri::State;
55
src/dbus/mutter_display_config.rsmodified+5 -4
@@ -3,8 +3,9 @@ use std::sync::{Arc, Mutex};
33
44 use serde::Serialize;
55 use zbus::fdo::RequestNameFlags;
6+use zbus::object_server::SignalEmitter;
67 use zbus::zvariant::{self, OwnedValue, Type};
7-use zbus::{dbus_interface, fdo, SignalContext};
8+use zbus::{fdo, interface};
89
910 use super::Start;
1011 use crate::backend::IpcOutputMap;
@@ -43,7 +44,7 @@ pub struct LogicalMonitor {
4344 properties: HashMap<String, OwnedValue>,
4445 }
4546
46-#[dbus_interface(name = "org.gnome.Mutter.DisplayConfig")]
47+#[interface(name = "org.gnome.Mutter.DisplayConfig")]
4748 impl DisplayConfig {
4849 async fn get_current_state(
4950 &self,
@@ -156,8 +157,8 @@ impl DisplayConfig {
156157 Ok((0, monitors, logical_monitors, properties))
157158 }
158159
159- #[dbus_interface(signal)]
160- pub async fn monitors_changed(ctxt: &SignalContext<'_>) -> zbus::Result<()>;
160+ #[zbus(signal)]
161+ pub async fn monitors_changed(ctxt: &SignalEmitter<'_>) -> zbus::Result<()>;
161162 }
162163
163164 impl DisplayConfig {
src/dbus/mutter_screen_cast.rsmodified+16 -15
@@ -5,8 +5,9 @@ use std::sync::{Arc, Mutex};
55
66 use serde::Deserialize;
77 use zbus::fdo::RequestNameFlags;
8+use zbus::object_server::{InterfaceRef, SignalEmitter};
89 use zbus::zvariant::{DeserializeDict, OwnedObjectPath, SerializeDict, Type, Value};
9-use zbus::{dbus_interface, fdo, InterfaceRef, ObjectServer, SignalContext};
10+use zbus::{fdo, interface, ObjectServer};
1011
1112 use super::Start;
1213 use crate::backend::IpcOutputMap;
@@ -94,14 +95,14 @@ pub enum ScreenCastToNiri {
9495 session_id: usize,
9596 target: StreamTargetId,
9697 cursor_mode: CursorMode,
97- signal_ctx: SignalContext<'static>,
98+ signal_ctx: SignalEmitter<'static>,
9899 },
99100 StopCast {
100101 session_id: usize,
101102 },
102103 }
103104
104-#[dbus_interface(name = "org.gnome.Mutter.ScreenCast")]
105+#[interface(name = "org.gnome.Mutter.ScreenCast")]
105106 impl ScreenCast {
106107 async fn create_session(
107108 &self,
@@ -136,26 +137,26 @@ impl ScreenCast {
136137 Ok(path)
137138 }
138139
139- #[dbus_interface(property)]
140+ #[zbus(property)]
140141 async fn version(&self) -> i32 {
141142 4
142143 }
143144 }
144145
145-#[dbus_interface(name = "org.gnome.Mutter.ScreenCast.Session")]
146+#[interface(name = "org.gnome.Mutter.ScreenCast.Session")]
146147 impl Session {
147148 async fn start(&self) {
148149 debug!("start");
149150
150151 for (stream, iface) in &*self.streams.lock().unwrap() {
151- stream.start(self.id, iface.signal_context().clone());
152+ stream.start(self.id, iface.signal_emitter().clone());
152153 }
153154 }
154155
155156 pub async fn stop(
156157 &self,
157158 #[zbus(object_server)] server: &ObjectServer,
158- #[zbus(signal_context)] ctxt: SignalContext<'_>,
159+ #[zbus(signal_context)] ctxt: SignalEmitter<'_>,
159160 ) {
160161 debug!("stop");
161162
@@ -175,7 +176,7 @@ impl Session {
175176 let streams = mem::take(&mut *self.streams.lock().unwrap());
176177 for (_, iface) in streams.iter() {
177178 server
178- .remove::<Stream, _>(iface.signal_context().path())
179+ .remove::<Stream, _>(iface.signal_emitter().path())
179180 .await
180181 .unwrap();
181182 }
@@ -264,17 +265,17 @@ impl Session {
264265 Ok(path)
265266 }
266267
267- #[dbus_interface(signal)]
268- async fn closed(ctxt: &SignalContext<'_>) -> zbus::Result<()>;
268+ #[zbus(signal)]
269+ async fn closed(ctxt: &SignalEmitter<'_>) -> zbus::Result<()>;
269270 }
270271
271-#[dbus_interface(name = "org.gnome.Mutter.ScreenCast.Stream")]
272+#[interface(name = "org.gnome.Mutter.ScreenCast.Stream")]
272273 impl Stream {
273- #[dbus_interface(signal)]
274- pub async fn pipe_wire_stream_added(ctxt: &SignalContext<'_>, node_id: u32)
274+ #[zbus(signal)]
275+ pub async fn pipe_wire_stream_added(ctxt: &SignalEmitter<'_>, node_id: u32)
275276 -> zbus::Result<()>;
276277
277- #[dbus_interface(property)]
278+ #[zbus(property)]
278279 async fn parameters(&self) -> StreamParameters {
279280 match &self.target {
280281 StreamTarget::Output(output) => {
@@ -361,7 +362,7 @@ impl Stream {
361362 }
362363 }
363364
364- fn start(&self, session_id: usize, ctxt: SignalContext<'static>) {
365+ fn start(&self, session_id: usize, ctxt: SignalEmitter<'static>) {
365366 if self.was_started.load(Ordering::SeqCst) {
366367 return;
367368 }
src/dbus/mutter_service_channel.rsmodified+6 -7
@@ -1,9 +1,8 @@
1-use std::os::fd::{FromRawFd, IntoRawFd};
21 use std::os::unix::net::UnixStream;
32 use std::sync::Arc;
43
54 use smithay::reexports::wayland_server::DisplayHandle;
6-use zbus::dbus_interface;
5+use zbus::{fdo, interface, zvariant};
76
87 use super::Start;
98 use crate::niri::ClientState;
@@ -12,14 +11,14 @@ pub struct ServiceChannel {
1211 display: DisplayHandle,
1312 }
1413
15-#[dbus_interface(name = "org.gnome.Mutter.ServiceChannel")]
14+#[interface(name = "org.gnome.Mutter.ServiceChannel")]
1615 impl ServiceChannel {
1716 async fn open_wayland_service_connection(
1817 &mut self,
1918 service_client_type: u32,
20- ) -> zbus::fdo::Result<zbus::zvariant::OwnedFd> {
19+ ) -> fdo::Result<zvariant::OwnedFd> {
2120 if service_client_type != 1 {
22- return Err(zbus::fdo::Error::InvalidArgs(
21+ return Err(fdo::Error::InvalidArgs(
2322 "Invalid service client type".to_owned(),
2423 ));
2524 }
@@ -34,7 +33,7 @@ impl ServiceChannel {
3433 credentials_unknown: true,
3534 });
3635 self.display.insert_client(sock2, data).unwrap();
37- Ok(unsafe { zbus::zvariant::OwnedFd::from_raw_fd(sock1.into_raw_fd()) })
36+ Ok(zvariant::OwnedFd::from(std::os::fd::OwnedFd::from(sock1)))
3837 }
3938 }
4039
@@ -46,7 +45,7 @@ impl ServiceChannel {
4645
4746 impl Start for ServiceChannel {
4847 fn start(self) -> anyhow::Result<zbus::blocking::Connection> {
49- let conn = zbus::blocking::ConnectionBuilder::session()?
48+ let conn = zbus::blocking::connection::Builder::session()?
5049 .name("org.gnome.Mutter.ServiceChannel")?
5150 .serve_at("/org/gnome/Mutter/ServiceChannel", self)?
5251 .build()?;
src/niri.rsmodified+4 -4
@@ -2067,7 +2067,7 @@ impl Niri {
20672067
20682068 use smithay::reexports::rustix::io::{fcntl_setfd, FdFlags};
20692069
2070- let conn = zbus::blocking::ConnectionBuilder::system()?.build()?;
2070+ let conn = zbus::blocking::Connection::system()?;
20712071
20722072 let message = conn.call_method(
20732073 Some("org.freedesktop.login1"),
@@ -2077,7 +2077,7 @@ impl Niri {
20772077 &("handle-power-key", "niri", "Power key handling", "block"),
20782078 )?;
20792079
2080- let fd: zbus::zvariant::OwnedFd = message.body()?;
2080+ let fd: zbus::zvariant::OwnedFd = message.body().deserialize()?;
20812081
20822082 // Don't leak the fd to child processes.
20832083 let borrowed = unsafe { BorrowedFd::borrow_raw(fd.as_raw_fd()) };
@@ -4294,7 +4294,7 @@ impl Niri {
42944294 async_io::block_on(async move {
42954295 iface
42964296 .get()
4297- .stop(&server, iface.signal_context().clone())
4297+ .stop(server.inner(), iface.signal_emitter().clone())
42984298 .await
42994299 });
43004300 }
@@ -4774,7 +4774,7 @@ impl Niri {
47744774 };
47754775
47764776 async_io::block_on(async move {
4777- if let Err(err) = DisplayConfig::monitors_changed(iface.signal_context()).await
4777+ if let Err(err) = DisplayConfig::monitors_changed(iface.signal_emitter()).await
47784778 {
47794779 warn!("error emitting MonitorsChanged: {err:?}");
47804780 }
src/pw_utils.rsmodified+2 -2
@@ -41,7 +41,7 @@ use smithay::reexports::calloop::generic::Generic;
4141 use smithay::reexports::calloop::{Interest, LoopHandle, Mode, PostAction};
4242 use smithay::reexports::gbm::Modifier;
4343 use smithay::utils::{Physical, Scale, Size, Transform};
44-use zbus::SignalContext;
44+use zbus::object_server::SignalEmitter;
4545
4646 use crate::dbus::mutter_screen_cast::{self, CursorMode};
4747 use crate::niri::State;
@@ -188,7 +188,7 @@ impl PipeWire {
188188 refresh: u32,
189189 alpha: bool,
190190 cursor_mode: CursorMode,
191- signal_ctx: SignalContext<'static>,
191+ signal_ctx: SignalEmitter<'static>,
192192 ) -> anyhow::Result<Cast> {
193193 let _span = tracy_client::span!("PipeWire::start_cast");
194194
src/utils/spawning.rsmodified+2 -1
@@ -424,8 +424,9 @@ mod systemd {
424424
425425 trace!("waiting for JobRemoved");
426426 for message in signals {
427+ let body = message.body();
427428 let body: (u32, OwnedObjectPath, &str, &str) =
428- message.body().context("error parsing signal")?;
429+ body.deserialize().context("error parsing signal")?;
429430
430431 if body.1 == job {
431432 // Our transient unit had started, we're good to exit the intermediate child.