aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/niri.rs6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/niri.rs b/src/niri.rs
index 80e97baf..60365e0b 100644
--- a/src/niri.rs
+++ b/src/niri.rs
@@ -5808,7 +5808,11 @@ impl Niri {
Ok(())
}
- let locked = self.is_locked();
+ // Consider only the fully locked state here. When using the locked hint with sleep
+ // inhibitor tools, we want to allow sleep only after the screens are fully cleared with
+ // the lock screen, which corresponds to the Locked state.
+ let locked = matches!(self.lock_state, LockState::Locked(_));
+
if self.locked_hint.is_some_and(|h| h == locked) {
return;
}