Fix LockedHint locked condition
Browse files at this commitd85eaf97990da6a265dd2e09fe110418f7c873caParent: 25cbb731 changed file +5 -1
- src/niri.rs +5 -1
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 | } |