Respect natural-scroll for workspace switch gesture

This commit is contained in:
Ivan Molodetskikh
2024-02-03 09:00:08 +04:00
parent 1f72089a46
commit b23dd4b800
2 changed files with 15 additions and 6 deletions
+1 -1
View File
@@ -1462,7 +1462,7 @@ impl<W: LayoutElement> Layout<W> {
for monitor in monitors {
if let Some(WorkspaceSwitch::Gesture(gesture)) = &mut monitor.workspace_switch {
// Normalize like GNOME Shell's workspace switching.
let delta_y = -delta_y / 400.;
let delta_y = delta_y / 400.;
let min = gesture.center_idx.saturating_sub(1) as f64;
let max = (gesture.center_idx + 1).min(monitor.workspaces.len() - 1) as f64;