forge
Explore
Log in

Don't you dare go Hollow

Fix LockedHint locked condition

Browse files at this commit

d85eaf97990da6a265dd2e09fe110418f7c873caIvan MolodetskikhParent: 25cbb73
src/niri.rsmodified+5 -1
@@ -5808,7 +5808,11 @@ impl Niri {
5808 Ok(())5808 Ok(())
5809 }5809 }
5810 5810
5811- let locked = self.is_locked();5811+ // Consider only the fully locked state here. When using the locked hint with sleep
5812+ // inhibitor tools, we want to allow sleep only after the screens are fully cleared with
5813+ // the lock screen, which corresponds to the Locked state.
5814+ let locked = matches!(self.lock_state, LockState::Locked(_));
5815+
5812 if self.locked_hint.is_some_and(|h| h == locked) {5816 if self.locked_hint.is_some_and(|h| h == locked) {
5813 return;5817 return;
5814 }5818 }