diff options
author | V3n3RiX <venerix@koprulu.sector> | 2022-05-12 16:42:50 +0300 |
---|---|---|
committer | V3n3RiX <venerix@koprulu.sector> | 2022-05-12 16:42:50 +0300 |
commit | 752d6256e5204b958b0ef7905675a940b5e9172f (patch) | |
tree | 330d16e6362a49cbed8875a777fe641a43376cd3 /gui-apps/tuigreet/files/tuigreet-0.7.1-power-command-notify.patch | |
parent | 0c100b7dd2b30e75b799d806df4ef899fd98e1ea (diff) |
gentoo resync : 12.05.2022
Diffstat (limited to 'gui-apps/tuigreet/files/tuigreet-0.7.1-power-command-notify.patch')
-rw-r--r-- | gui-apps/tuigreet/files/tuigreet-0.7.1-power-command-notify.patch | 42 |
1 files changed, 0 insertions, 42 deletions
diff --git a/gui-apps/tuigreet/files/tuigreet-0.7.1-power-command-notify.patch b/gui-apps/tuigreet/files/tuigreet-0.7.1-power-command-notify.patch deleted file mode 100644 index 99b79d7c2a1b..000000000000 --- a/gui-apps/tuigreet/files/tuigreet-0.7.1-power-command-notify.patch +++ /dev/null @@ -1,42 +0,0 @@ ---- a/src/greeter.rs -+++ b/src/greeter.rs -@@ -16,7 +16,7 @@ use tokio::{ - process::Command, - sync::{ - oneshot::{Receiver, Sender}, -- RwLock, RwLockWriteGuard, -+ Notify, RwLock, RwLockWriteGuard, - }, - }; - use zeroize::Zeroize; -@@ -90,6 +90,7 @@ pub struct Greeter { - - pub power_commands: HashMap<PowerOption, String>, - pub power_command: Option<Command>, -+ pub power_command_notify: Arc<Notify>, - pub power_setsid: bool, - - pub working: bool, ---- a/src/main.rs -+++ b/src/main.rs -@@ -64,9 +64,12 @@ async fn run() -> Result<(), Box<dyn Error>> { - - tokio::task::spawn({ - let greeter = greeter.clone(); -+ let notify = greeter.read().await.power_command_notify.clone(); - - async move { - loop { -+ notify.notified().await; -+ - let command = greeter.write().await.power_command.take(); - - if let Some(mut command) = command { ---- a/src/power.rs -+++ b/src/power.rs -@@ -50,4 +50,5 @@ pub fn power(greeter: &mut Greeter, option: PowerOption) { - }; - - greeter.power_command = Some(command); -+ greeter.power_command_notify.notify_one(); - } |