From d85eaf97990da6a265dd2e09fe110418f7c873ca Mon Sep 17 00:00:00 2001 From: Ivan Molodetskikh Date: Mon, 14 Jul 2025 14:39:42 +0300 Subject: Fix LockedHint locked condition --- src/niri.rs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'src') 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; } -- cgit