diff --git a/src/backend/input.rs b/src/backend/input.rs index e0640f3..2bf6568 100644 --- a/src/backend/input.rs +++ b/src/backend/input.rs @@ -370,18 +370,13 @@ where ); } - let scroll_threshold = 0.1; - let mut haptics: Option = None; - // Pass mouse motion events only if not scrolling // (allows scrolling on all Chromium-based applications) - if app.input_state.pointers[idx].now.scroll.abs() <= scroll_threshold { - haptics = hovered.backend.on_hover(app, &hit); - } + let haptics = hovered.backend.on_hover(app, &hit); pointer = &mut app.input_state.pointers[idx]; - if pointer.now.scroll.abs() > scroll_threshold { + if pointer.now.scroll.abs() > 0.1 { let scroll = pointer.now.scroll; if app.input_state.pointers[1 - idx] .interaction diff --git a/src/hid/mod.rs b/src/hid/mod.rs index 0a347c5..d4d013c 100644 --- a/src/hid/mod.rs +++ b/src/hid/mod.rs @@ -242,7 +242,7 @@ impl HidProvider for UInputProvider { self.desktop_origin = origin; } fn mouse_move(&mut self, pos: Vec2) { - if self.current_action.pos.is_none() { + if self.current_action.pos.is_none() && self.current_action.scroll.is_none() { self.current_action.pos = Some(pos); } self.current_action.last_requested_pos = Some(pos); @@ -256,6 +256,9 @@ impl HidProvider for UInputProvider { fn wheel(&mut self, delta: i32) { if self.current_action.scroll.is_none() { self.current_action.scroll = Some(delta); + // Pass mouse motion events only if not scrolling + // (allows scrolling on all Chromium-based applications) + self.current_action.pos = None; } } fn commit(&mut self) {