aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIvan Molodetskikh <yalterz@gmail.com>2025-03-23 09:31:24 +0300
committerIvan Molodetskikh <yalterz@gmail.com>2025-03-23 09:31:51 +0300
commitb27140950935da810c4c58fd763a99781923c1bb (patch)
tree8b4c6864be726b875970bd441c26256efe96e73e
parent500dcca9b70c9b8968f3dbcfe06c4177ca7fd66a (diff)
downloadniri-b27140950935da810c4c58fd763a99781923c1bb.tar.gz
niri-b27140950935da810c4c58fd763a99781923c1bb.tar.bz2
niri-b27140950935da810c4c58fd763a99781923c1bb.zip
dbus/gnome_shell_screenshot: Fix pick_color return type
-rw-r--r--src/dbus/gnome_shell_screenshot.rs6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/dbus/gnome_shell_screenshot.rs b/src/dbus/gnome_shell_screenshot.rs
index dd762498..d837b8b3 100644
--- a/src/dbus/gnome_shell_screenshot.rs
+++ b/src/dbus/gnome_shell_screenshot.rs
@@ -3,8 +3,8 @@ use std::path::PathBuf;
use niri_ipc::PickedColor;
use zbus::fdo::{self, RequestNameFlags};
-use zbus::interface;
use zbus::zvariant::OwnedValue;
+use zbus::{interface, zvariant};
use super::Start;
@@ -71,10 +71,10 @@ impl Screenshot {
};
let mut result = HashMap::new();
- let rgb_slice: &[f64] = &color.rgb;
+ let [r, g, b] = color.rgb;
result.insert(
"color".to_string(),
- zbus::zvariant::Value::from(rgb_slice).try_into().unwrap(),
+ zvariant::OwnedValue::try_from(zvariant::Value::from((r, g, b))).unwrap(),
);
Ok(result)