diff --git a/src/input/mod.rs b/src/input/mod.rs index c66c3169..28d053be 100644 --- a/src/input/mod.rs +++ b/src/input/mod.rs @@ -3976,22 +3976,24 @@ impl State { } fn on_gesture_swipe_begin(&mut self, event: I::GestureSwipeBeginEvent) { - if self.niri.window_mru_ui.is_open() { - // Don't start swipe gestures while in the MRU. + if self.niri.window_mru_ui.is_open() || self.niri.screenshot_ui.is_open() { + // Don't start swipe gestures while in the compositor UI. return; } - if event.fingers() == 3 { - self.niri.gesture_swipe_3f_cumulative = Some((0., 0.)); + if !self.niri.is_locked() { + if event.fingers() == 3 { + self.niri.gesture_swipe_3f_cumulative = Some((0., 0.)); - // We handled this event. - return; - } else if event.fingers() == 4 { - self.niri.layout.overview_gesture_begin(); - self.niri.queue_redraw_all(); + // We handled this event. + return; + } else if event.fingers() == 4 { + self.niri.layout.overview_gesture_begin(); + self.niri.queue_redraw_all(); - // We handled this event. - return; + // We handled this event. + return; + } } let serial = SERIAL_COUNTER.next_serial();