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 {
77 };77 };
78 78
79 // Filter actions when the key is released or the session is locked.79 // Filter actions when the key is released or the session is locked.
80- if !pressed80+ if !pressed {
81- || self.niri.is_locked()81+ return;
82- && !matches!(82+ }
83- action,83+
84- Action::Quit84+ if self.niri.is_locked()
85- | Action::ChangeVt(_)85+ && !matches!(
86- | Action::Suspend86+ action,
87- | Action::PowerOffMonitors87+ Action::Quit
88- )88+ | Action::ChangeVt(_)
89+ | Action::Suspend
90+ | Action::PowerOffMonitors
91+ )
89 {92 {
90 return;93 return;
91 }94 }