mirror of
https://github.com/niri-wm/niri.git
synced 2026-06-23 02:05:33 +07:00
Remove logind-zbus dependency
It isn't updated and we don't really need it anyway.
This commit is contained in:
Generated
-11
@@ -1879,16 +1879,6 @@ version = "0.4.20"
|
||||
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"
|
||||
@@ -2062,7 +2052,6 @@ dependencies = [
|
||||
"keyframe",
|
||||
"libc",
|
||||
"log",
|
||||
"logind-zbus",
|
||||
"niri-config",
|
||||
"niri-ipc",
|
||||
"notify-rust",
|
||||
|
||||
+1
-2
@@ -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.
|
||||
|
||||
+11
-3
@@ -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(
|
||||
|
||||
Reference in New Issue
Block a user