Recover previous locked state
This commit is contained in:
parent
7366808e8c
commit
08202f1572
4 changed files with 83 additions and 27 deletions
|
|
@ -7,7 +7,6 @@ use logind_zbus::{
|
|||
session::SessionProxy,
|
||||
};
|
||||
use std::{any::TypeId, error::Error, os::fd::OwnedFd, sync::Arc};
|
||||
use tokio::time;
|
||||
use zbus::Connection;
|
||||
|
||||
use crate::locker::Message;
|
||||
|
|
@ -68,7 +67,9 @@ pub fn subscription() -> Subscription<Message> {
|
|||
pub async fn handler(msg_tx: &mut mpsc::Sender<Message>) -> Result<(), Box<dyn Error>> {
|
||||
let connection = Connection::system().await?;
|
||||
let manager = ManagerProxy::new(&connection).await?;
|
||||
let session_path = manager.get_session_by_PID(std::os::unix::process::parent_id()).await?;
|
||||
let session_path = manager
|
||||
.get_session_by_PID(std::os::unix::process::parent_id())
|
||||
.await?;
|
||||
let session = SessionProxy::builder(&connection)
|
||||
.path(&session_path)?
|
||||
.build()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue