diff options
Diffstat (limited to 'src/ui/window.rs')
-rw-r--r-- | src/ui/window.rs | 12 |
1 files changed, 1 insertions, 11 deletions
diff --git a/src/ui/window.rs b/src/ui/window.rs index bf23729..7fd4450 100644 --- a/src/ui/window.rs +++ b/src/ui/window.rs @@ -583,17 +583,7 @@ impl FurtheranceWindow { } fn get_idle_time(&self) -> Result<u64, Box<dyn std::error::Error>> { - let c = Connection::new_session()?; - - let p = c.with_proxy( - "org.gnome.Mutter.IdleMonitor", - "/org/gnome/Mutter/IdleMonitor/Core", - Duration::from_millis(5000), - ); - let (idle_time,): (u64,) = - p.method_call("org.gnome.Mutter.IdleMonitor", "GetIdletime", ())?; - - Ok(idle_time / 1000) + crate::helpers::get_idle_time() } fn check_user_idle(&self) { |