forge
Explore
Log in

Don't you dare go Hollow

Split if into two for readability

Browse files at this commit

2ca9f3ff80a62e69ab6a81c6124a8ac861206f63Ivan MolodetskikhParent: c39b8a4
src/input.rsmodified+12 -9
@@ -77,15 +77,18 @@ impl State {
7777 };
7878
7979 // Filter actions when the key is released or the session is locked.
80- if !pressed
81- || self.niri.is_locked()
82- && !matches!(
83- action,
84- Action::Quit
85- | Action::ChangeVt(_)
86- | Action::Suspend
87- | Action::PowerOffMonitors
88- )
80+ if !pressed {
81+ return;
82+ }
83+
84+ if self.niri.is_locked()
85+ && !matches!(
86+ action,
87+ Action::Quit
88+ | Action::ChangeVt(_)
89+ | Action::Suspend
90+ | Action::PowerOffMonitors
91+ )
8992 {
9093 return;
9194 }