input: Zoom on Super+Scroll

This commit is contained in:
Victoria Brekenfeld 2025-02-05 18:05:08 +01:00 committed by Victoria Brekenfeld
parent 58f96e6f4a
commit b7d4a66c22
3 changed files with 81 additions and 29 deletions

View file

@ -2074,7 +2074,13 @@ impl Shell {
}
}
pub fn trigger_zoom(&mut self, seat: &Seat<State>, level: f64, movement: ZoomMovement) {
pub fn trigger_zoom(
&mut self,
seat: &Seat<State>,
level: f64,
movement: ZoomMovement,
animate: bool,
) {
if self.zoom_state.is_none() && level == 1. {
return;
}
@ -2099,7 +2105,7 @@ impl Shell {
seat: seat.clone(),
level,
movement,
previous_level: Some((previous_level, Instant::now())),
previous_level: animate.then_some((previous_level, Instant::now())),
});
}