aboutsummaryrefslogtreecommitdiff
path: root/src/input.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/input.rs')
-rw-r--r--src/input.rs21
1 files changed, 12 insertions, 9 deletions
diff --git a/src/input.rs b/src/input.rs
index 06fa5abf..436a7b01 100644
--- a/src/input.rs
+++ b/src/input.rs
@@ -77,15 +77,18 @@ impl State {
};
// Filter actions when the key is released or the session is locked.
- if !pressed
- || self.niri.is_locked()
- && !matches!(
- action,
- Action::Quit
- | Action::ChangeVt(_)
- | Action::Suspend
- | Action::PowerOffMonitors
- )
+ if !pressed {
+ return;
+ }
+
+ if self.niri.is_locked()
+ && !matches!(
+ action,
+ Action::Quit
+ | Action::ChangeVt(_)
+ | Action::Suspend
+ | Action::PowerOffMonitors
+ )
{
return;
}