diff options
| author | Ivan Molodetskikh <yalterz@gmail.com> | 2024-02-10 14:58:22 +0400 |
|---|---|---|
| committer | Ivan Molodetskikh <yalterz@gmail.com> | 2024-02-10 14:58:22 +0400 |
| commit | 5c4d9824a4e3cf5494b15d1a0837ccb0e86cc0aa (patch) | |
| tree | 803709b7e9b48d59b3916836eda789e56af16c7e | |
| parent | ca4ee5ae25c1ad3b50a0d74038eea652f427c3e9 (diff) | |
| download | niri-5c4d9824a4e3cf5494b15d1a0837ccb0e86cc0aa.tar.gz niri-5c4d9824a4e3cf5494b15d1a0837ccb0e86cc0aa.tar.bz2 niri-5c4d9824a4e3cf5494b15d1a0837ccb0e86cc0aa.zip | |
Remove logind-zbus dependency
It isn't updated and we don't really need it anyway.
| -rw-r--r-- | Cargo.lock | 11 | ||||
| -rw-r--r-- | Cargo.toml | 3 | ||||
| -rw-r--r-- | src/backend/tty.rs | 14 |
3 files changed, 12 insertions, 16 deletions
@@ -1880,16 +1880,6 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b5e6163cb8c49088c2c36f57875e58ccd8c87c7427f7fbd50ea6710b2f3f2e8f" [[package]] -name = "logind-zbus" -version = "3.1.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c07a2542f6e91ea92780158654852190edb2ba0b232d9d00d649d0c691cb7eb3" -dependencies = [ - "serde", - "zbus", -] - -[[package]] name = "loom" version = "0.7.1" source = "registry+https://github.com/rust-lang/crates.io-index" @@ -2062,7 +2052,6 @@ dependencies = [ "keyframe", "libc", "log", - "logind-zbus", "niri-config", "niri-ipc", "notify-rust", @@ -54,7 +54,6 @@ input = { version = "0.9.0", features = ["libinput_1_21"] } keyframe = { version = "1.1.1", default-features = false } libc = "0.2.153" log = { version = "0.4.20", features = ["max_level_trace", "release_max_level_debug"] } -logind-zbus = { version = "3.1.2", optional = true } niri-config = { version = "0.1.1", path = "niri-config" } niri-ipc = { version = "0.1.1", path = "niri-ipc", features = ["clap"] } notify-rust = { version = "4.10.0", optional = true } @@ -99,7 +98,7 @@ proptest-derive = "0.4.0" [features] default = ["dbus", "xdp-gnome-screencast"] # Enables DBus support (required for xdp-gnome and power button inhibiting). -dbus = ["zbus", "logind-zbus", "async-channel", "async-io", "notify-rust", "url"] +dbus = ["zbus", "async-channel", "async-io", "notify-rust", "url"] # Enables screencasting support through xdg-desktop-portal-gnome. xdp-gnome-screencast = ["dbus", "pipewire"] # Enables the Tracy profiler instrumentation. diff --git a/src/backend/tty.rs b/src/backend/tty.rs index 051376e9..4a044e4d 100644 --- a/src/backend/tty.rs +++ b/src/backend/tty.rs @@ -1509,9 +1509,17 @@ fn refresh_interval(mode: DrmMode) -> Duration { #[cfg(feature = "dbus")] fn suspend() -> anyhow::Result<()> { let conn = zbus::blocking::Connection::system().context("error connecting to system bus")?; - let manager = logind_zbus::manager::ManagerProxyBlocking::new(&conn) - .context("error creating login manager proxy")?; - manager.suspend(true).context("error suspending") + + conn.call_method( + Some("org.freedesktop.login1"), + "/org/freedesktop/login1", + Some("org.freedesktop.login1.Manager"), + "Suspend", + &(true), + ) + .context("error suspending")?; + + Ok(()) } fn queue_estimated_vblank_timer( |
